ablog

不器用で落着きのない技術者のメモ

ORA-08102: index key not found, obj# %s, file %s, block %s (%s)

現象

SQL> UPDATE ...

*
ERROR at line 1:
ORA-08102: index key not found, obj# 59193, file 190, block 26647 (2)
ORA-06512: at line 9

対処

  • object_id から不整合が発生しているインデックスを調べる。
SQL> col object_name for a30
SQL> select object_name, object_type from dba_objects where object_id = 59193;

OBJECT_NAME                    OBJECT_TYPE
------------------------------ -------------------
DETAIL_UK1                     INDEX
  • ケースバイケースで適切な対処を行う。

if ORA-08102 on table objects -> resolve by "analyze table ... validate structure.. or use dbv to check corrupt on table" ) don't forget check error on OS , trace file and alert log file.

  • > (ORA-08102 on index objects), if rebuilt indexes, But still error ORA-08102: Drop that index and recreate it.
Surachart Opun's Blog: ORA-08102: index key not found, obj# ... Solution to resolve

Paweł Barut said...
Rebuilding index will not work on most (if not in all) cases. Rebuilding index does not visit table at all. It uses existing index structure, to create new segment, so this problem will be transferred to new index as well.

Surachart Opun's Blog: ORA-08102: index key not found, obj# ... Solution to resolve

インデックスの場合は rebuid より、drop & create したほうが良いらしい。