How to check index build status on Oracle 11?

I made a terrible mistake when creating the SQL index:

create index IDX_DATA_TABLE_CUSECO on DATA_TABLE (CUSTOMER_ID, SESSION_ID, CONTACT_ID) tablespace IDX_TABLESPACE LOCAL ; 

As you can see, I skipped the "ONLINE" keyword to create an index without locking the high-usage PRODUCTION table with 600 m + records. Corrected SQL:

 create index IDX_DATA_TABLE_CUSECO on DATA_TABLE (CUSTOMER_ID, SESSION_ID, CONTACT_ID) tablespace IDX_TABLESPACE LOCAL ONLINE; 

I did this under PL / SQL Developer. When I tried to stop it, the program stopped responding and crashed.

The production system has been down for 9 hours and my boss wants to explode .: D

Is there any chance to see how many seconds / minutes / hours Oracle 11g has left to process this index creation? Or maybe there is an opportunity to see if Oracle is running on this request? (PL / SQL developer crashed).

For haters: I know that I have to do this, as mentioned here: ( source )

 CREATE INDEX cust_idx on customer(id) UNUSABLE LOCAL; ALTER INDEX cust_idx REBUILD parallel 6 NOLOGGING ONLINE; 

+7
source share
1 answer

You should be able to view the progress of the operation in V$SESSION_LONGOPS

 SELECT sid, serial#, target, target_desc, sofar, totalwork, start_time, time_remaining, elapsed_seconds FROM v$session_longops WHERE time_remaining > 0 

Of course, on a production system, I probably would have killed the session hours ago, rather than letting the DDL operation continue to prevent users from accessing the application.

+13
source

All Articles