Tuesday, February 15, 2011

ORA-08102: index key not found, obj#

You may encounter ORA-08102: index key not found, obj# when updating table

For example:
ORA-08102: index key not found, obj# 176528, file 57, block 7549

Cause Of this error:
Some type of corruption occurred either in the table or index which causes to this mismatch.

Solution:
This error I had resolved by rebuilding the index (ORA-08102 on index objects).

Steps:
1-Check the object causing the problem, if it's index... try to rebuild:

in our example above:

SQL> select object_name, object_type
from dba_objects
where object_id = 176528;

-- 176528 = [obj# in ORA-08102]

OBJECT_NAME OBJECT_TYPE
--------------- -------------------
CPN_MAX_MAN_IDX INDEX

2- And then rebuild it.

SQL> alter index CPN_MAX_MAN_IDX rebuild online;


3- If the index rebuild didn't solve the problem drop the index and recreate it again.

4- If ORA-08102 is on a table then try to analyze the table with validate structure option.

No comments: