Thursday, October 29, 2015

Fix ORA-08104

While rebuilding index my toad session was hanged and I decided to kill session but it also hanged

SQL> alter index xxx.xxxxx rebuild online parallel 8;

To fix it I connected db with new sesssion and got object_id of mentioned index

 SQL> select object_id obj#, i.status from dba_indexes i, dba_objects o  
 where o.object_name=i.index_name and  
 i.index_name='LOYAL_RES_IDX1';


--Note flags
SQL> select flags from ind$ where obj#=356001; 


Using DBMS_REPAIR package clean index

SQL> declare  
 isclean boolean;  
 begin  
 isclean :=false;  
 while isclean=false loop  
 isclean := DBMS_REPAIR.ONLINE_INDEX_CLEAN  
 (dbms_repair.all_index_id,dbms_repair.lock_wait);  
 dbms_lock.sleep(10);  
 end loop;  
 end;  
 /  


--Note flags
 SQL> select flags from ind$ where obj#=356001; 


As you see it was decreased and normal

1 comment:

  1. Superb Blog. I really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your updation.
    Oracle Training Institute in chennai

    ReplyDelete

Cannot access dba_directories inside procedure

 Recently I faced one of familiar Oracle error ORA -00942 : table or view does not exist   I got it in while compiling procedure, becaus...