David Lozano Lucas's blog

David Lozano Lucas's picture

Progress status of an index rebuild or creation, or other long operations.

articles: 

When we launch a long operation, such as a RMAN backup or rebuild of a large index, we can come to despair of not having an estimate of the time it may take. We can even come to think that is doing nothing.

For the progress of a long operation we can query the view V$SESSION_LONGOPS, first obtaining the process ID from V$SESSION. In the case of DBA, we know exactly which user is rebuilding the index, so we can simplify it into a single query.

David Lozano Lucas's picture

Quick overview of the state of an Oracle database.

articles: 

One common problem: You are allocated to a new project and find that nothing is documented.
By running this script, you get four important points of information: Tablespace status, installed products and its versions, oracle parameters different to default and status of tables:

David Lozano Lucas's picture

Use of the SQL Tuning Advisor

articles: 

Use the SQL Tuning Advisor for tuning SQL statements. Typically, you can run this advisor in response to an ADDM performance finding that recommends its use.

Additionally, you can run the SQL Tuning Advisor on the most resource-intensive SQL statements, referred to as top SQL, from the cursor cache or the AWR, as well as on a user-defined SQL workload.

To run the SQL Tuning Advisor do the following:

David Lozano Lucas's picture

Moving multiple tables and indexes between tablespaces at once

articles: 

Here I present a simple query to use when we want to move the tables and indexes of several users at once.

To make it one by one:

ALTER TABLE xxxxxx MOVE TABLESPACE TEST;
ALTER INDEX xxxxxx REBUILD TABLESPACE TEST;

To move data from multiple owners. In this example OWNER1 and OWNER2:

David Lozano Lucas's picture

Saluting. Start - Stop script

articles: 

It is an English word that sounds very funny in Spanish, almost unreal.
Well, just wanted to brand the blog with a first entry to introduce myself.
I work as an Oracle and SQL Server DBA (mixed profile, they call it -
concerns twice for the same pay, on me).
Here I will write "how to" articles as they emerge in my day to day.
If you can read Spanish, check out the blog I maintain for a little more time http://blog.davidlozanolucas.com/.

Subscribe to RSS - David Lozano Lucas's blog