Hello Friend's,
In This post we will see the step by step solution for error ORA-08102 .
So let's get started.
ORA-08102 is a mismatch between the key(s) stored in the index and the values stored in the table.
To resolve First step is to find which object is getting the error :
For example if we check the below error: we have got the file = 26 , Object# = 148371 , and block with error = 1629815
Error Text of the Database: "ORA-08102: index key not found, obj# 148371, file 26, block 1629815 (2)"
select owner, object_name, object_type
from dba_objects
where object_id = 148371;
or :
select owner,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME,BLOCK_ID
from dba_extents
where file_id = 26
and &BL between block_id AND block_id + blocks - 1;
Which returned the FINCORP.FINTAB
This is an index so the next step will be to rebuild the index
ALTER INDEX FINCORP.FINTAB rebuild;
But this didn’t resolve the error :
Rebuilding index will not work on mostly some cases might be diffrient.
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.
Solution is to drop and recreate the index
To Get Metadata of index :
set long 999999
SELECT DBMS_METADATA.get_ddl ('INDEX','FINTAB','FINCORP') FROM dba_indexes
Once you get the metadata , Drop the index and recreate it with the command .
Hope This Helps , If any suggestions , Kindly leave a comment
Regards
Sultan Khan
ConversionConversion EmoticonEmoticon