近期,一客户历史数据库屡次遇到ORA-00600: internal error code, arguments: [13011]。附带的,还有ORA-01499
SQL> analyze table WRH$_IOSTAT_DETAIL validate structure cascade;
analyze table WRH$_IOSTAT_DETAIL validate structure cascade
*
ERROR at line 1:
ORA-01499: table/index cross reference failure - see trace file
这个错误主要是因为索引与表产生了不一致的情况,本例中索引中的数据要多于表。如下:

一般都是采用重建索引的方式解决。但是可能直接重建索引并不能达到修复的效果。今天的这个故障直接rebuild index未能修复
今天尝试了一下table move再重建索引的办法,效果也是可以的
alter table WRH$_IOSTAT_DETAIL move;
alter index WRH$_IOSTAT_DETAIL_PK rebuild。
SQL> select /*+full(a) */ count(*) from WRH$_IOSTAT_DETAIL a
2 ;
COUNT(*)
----------
5037
SQL> select /*+index(WRH$_IOSTAT_DETAIL_PK t) */ count(*) from WRH$_IOSTAT_DETAIL t;
COUNT(*)
----------
5037
至此,问题解决。
当然,对于特定的表,比如此例中的 WRH$_IOSTAT_DETAIL,是Oracle的automatic workload repository的一个表,跟业务本身没有直接关系,跟用户确认好数据不要的话,可以直接truncate也可以修复
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8520577/viewspace-2714709/ ,如需转载,请注明出处,否则将追究法律责任。