ORA_08104: REBUILD FLAGのロックによって索引メンテナンスができない【公開済みバグ】

ORA-08104: this index object 6571 is being online built or rebuilt

一般現象:

ORA-8104 エラーは「REBUILD FLAG」というものが残っている場合に発生するエラーとなります。通常、索引の rebuild が何らかの原因で失敗した場合、SMON によるクリーンアップ処理が行われます。このクリーンアップ処理が終了する前に再度 rebuild を実行すると ORA-8104 が発生します。一般的にこのエラーは SMON によるクリーンアップ処理が終了するのを待つことで解消します。

特例現象:

索引の再作成中にセッションが切断されてしまい、その後、該当索引に対するDDL文を発行したら、ORA-08104が発生しています。これはORACLEの不具合となります。
ORACLE社内部情報によって該当不具合の内容を記載されています。
Bug番号 XXXXXXX
問題の内容:ALTER INDEX REBUILD ONLINE PROCESS KILLED, NO CLEAN UP OCCURED

PROBLEM: .

1. Clear description of the problem encountered:
The client and shadow process that were performing a ALTER INDEX
REBUILD ONLINE were killed. (kill -9) .
After that the base table for the index was unuseable:
SELECT statements returned a ORA-600 [kkdlfjou_1]
INSERT statements returned a ORA-600 [6002]
Attempts to drop the index returned ORA-8104
Attempts to rebuild the index returned the ORA-600 [kkdlfjou_1] .
2. Pertinent configuration information (MTS/OPS/distributed/etc)
None
3. Indication of the frequency and predictability of the problem
The symptoms after the killed ALTER INDEX happened every time.
4. Sequence of events leading to the problem
A unix shell script was being used to perform an ALTER INDEX
REBUILD ONLINE, Both the client process and the shadow process were
killed because it was felt they were taking to much time.
5. Technical impact on the customer. Include persistent after effects.
The base table that was unavailable is one of the major production tables

DIAGNOSTIC ANALYSIS:

The killed process that was performing the ALTER INDEX REBUILD ONLINE
left the REBUILD FLAG ( bit 512) in the IND$ table set, even after the
process was killed. Because other access to the base table checked this
the system thought that the ALTER REBUILD was still going on.
Also left were the IOT journalling tables that are created when doing
ALTER INDEX REBUILD ONLINE.

該当エラー解消方法:

1. DB のコールドバックアップを取得

2.DB を restrict モードに変更

ALTER SYSTEM ENABLE RESTRICTED SESSION;

3.索引の再構成中となっているオブジェクトを特定

select obj# from ind$ where bitand(flags, 512)=512;

4.該当インデックス情報を更新

Update ind$ set flags=flags-512 where obj#=<3.で取得した obj#>;
commit;

Select flags from ind$ where obj#=<3.で取得した obj#>;
-->正常に処理が出来たか確認。

5.該当インデックス、索引構成表削除

drop index <インデックス名>;

select owner,object_name,object_type from dba_objects
where object_name like 'SYS_JOURNAL%';

drop table <上記 SQL で取得した object_name>

(注意)
上記手順において索引の削除が行えない場合は、以下の手順にて削除を行って下さい。

1.該当インデックス情報を更新
select obj# from ind$ where bitand(flags, 512)=512; 

update ind$ set flags=0 where obj#=<上記 SQL で取得した obj#>;
commit;

2.DB 再起動

shutdown abort
startup
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License