Quantcast
Channel: ORACLE数据库服务热线:400-690-3643 诗檀软件 » Problem Solving – ORACLE数据库技术文刊-汇聚全世界的甲骨文技术 – ParnassusData诗檀软件旗下网站
Viewing all articles
Browse latest Browse all 6

Online index problem – ORA-08104

$
0
0

So, you’re creating (or rebuilding) an index ONLINE on a busy system. Your session dies, or it becomes necessary to kill the command, you may find that Oracle does not (always manage to) automatically clean up after itself.

CREATE INDEX my_ind ON my_table (mycol ASC)
 LOCAL LOGGING COMPRESS 1 ONLINE;

(ctrl-c)
ORA-01013: user requested cancel of current operation

select * from user_indexes where index_name = 'my_ind';

INDEX_NAME INDEX_TYPE
my_ind     NORMAL


OMG! WTF! TLA’s! The index is there, even though I cancelled the create statement! Lets drop it…

 
drop index my_ind;
 *
 ERROR at line 1:
 ORA-08104: this index object <B>79722</B> is being online built or rebuilt



So, HOW do I sort out this mess? Use DBMS_REPAIR!

  
  1  declare
  2  lv_ret BOOLEAN;
  3  begin
  4  lv_ret := dbms_repair.online_index_clean(79722);
  5* end;

select * from user_indexes where index_name = 'ind_name';

no rows selected



Bang! and the index (or, rather, left-over temporary extents from the build attempt) is gone, ready for you to try again.


Filed under: Administration, Problem Solving Tagged: 8104, INDEX, ONLINE, ORA-08104, ORA-8104, oracle, REBUILD

Viewing all articles
Browse latest Browse all 6

Trending Articles