RMAN> validate datafile 75;
发现坏块:
SQL> select * from v$database_block_corruption;
确认对象
select tablespace_name,segment_type,owner,segment_name
from dba_extents where file_id=75 and 93642
between block_id AND block_id + blocks - 1;
修复单个坏块:
RMAN>recover datafile 6 block 210,4740;
修复多个坏块:
RMAN>recover datafile 6 block 210,4740;
修复多个坏块:
recover corruption list;
修复方法2:
#可以使用10231事件忽略坏块,然后使用CTAS方式重建表最后rename table,别忘记rebuild index
alter session SET EVENTS '10231 trace name context forever,level 10';
create table tab_new as select * from tab;
rename tab to tab_bak;
rename tab_new to new;
alter index indexname rebuild;
alter session SET EVENTS '10231 trace name context off';
修复方法3:
alter session set db_file_multiblock_read_count=1;
execute DBMS_REPAIR.SKIP_CORRUPT_BLOCKS('JAMES','DEPT');
create table dept_new as select * from dept;
修复方法2:
#可以使用10231事件忽略坏块,然后使用CTAS方式重建表最后rename table,别忘记rebuild index
alter session SET EVENTS '10231 trace name context forever,level 10';
create table tab_new as select * from tab;
rename tab to tab_bak;
rename tab_new to new;
alter index indexname rebuild;
alter session SET EVENTS '10231 trace name context off';
修复方法3:
alter session set db_file_multiblock_read_count=1;
execute DBMS_REPAIR.SKIP_CORRUPT_BLOCKS('JAMES','DEPT');
create table dept_new as select * from dept;