3

How can I track the progress of a command such as this?

alter index myindex rebuild reverse online;
5

You should Query the V$SESSION_LONGOPS

select ops.OPNAME, ops.TIME_REMAINING,ops.start_time
from v$session_longops ops
where ops.sid=&your_sid
and ops.serial#=&your_serial
and time_remaining>0;

If the index rebuild is parallel, than you you must find the parallel slaves that do the work. This can be done by querying the V$PX_SESSION. Your session that issued the 'alter index' statement is the query coordinator

select ops.OPNAME, ops.TIME_REMAINING,ops.start_time
from v$px_session par, v$session_longops ops
where par.qcsid=&your_sid
and par.qcserial#=&your_serial
and ops.sid=par.sid
and ops.serial#=par.serial#
and ops.time_remaining>0;

But an index creation consists of more than one longops (scan the table, sort the data,...)

  • if you're using an IDE, you can usually browse sessions and see the v$longops status visually – thatjeffsmith Sep 14 '15 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.