ora-01578损坏IOT的PK索引,oracle11R2

使用DBV file=+ASMFILE blocksize=8192 userid=sys/ --查看数据文件坏块情况

使用以下SQL确认坏块的表/索引

SQL>select * from v$database_block_corruption;

SQL>select * from dba_extents where file_id='2' and '2033' between block_id and block_id+blocks-1;

确定损害的表分别为IOT的PK索引,相当于数据损坏,不能重建索引。表名称分别为:SYS.AQ$_ALERT_QT_I、SYSMAN.MGMT_METRICS_RAW

本库没有开归档日志,没有Rman备份。只能跳过坏块,exp,再imp。

1、exec dbms_repair.skip_corrupt_blocks('SYSMAN','MGMT_METRICS_RAW'); //设置跳过坏块。尝试使用这句alert system set events='10231 trace name context forever,level 10‘设置跳过坏块,无效。

2、exp system/passwd@sid file=xx.dmp tables=SYSMAN.MGMT_METRICS_RAW log=1.log

3、truncate时报错执行这句:alert system set events='10851 trace name context forever,level 1‘;

4、truncate table XXXX。

5、imp 导入备份的表

注:数据会有部分损失,但是能够正常使用数据库

posted @ 2017-09-27 18:14  HQin  阅读(353)  评论(0编辑  收藏  举报