Handling Block Corruption in ASM Enable Database
ORA-01578: ORACLE data block corrupted (file # 7, block # 65)
ORA-01110: data file 7: '+DB_DATA01/INDIAN/DATAFILE/USERS.267.3'
SQL> alter database datafile 7 offline;
RMAN> CONNECT TARGET /;
connected to target database: INDIAN (DBID=1449158500)
RMAN> BACKUP AS COPY DATAFILE 7 FORMAT '/tmp/df_%f';
$ dd if=df_7 of=f7b65.dd count=1 skip=65 bs=8192
NOTE:
Lets say that at this step the block has been examined and patched.$ dd if=f7b65.dd of=df_7 bs=8192 seek=65 count=1 conv=notrunc
RMAN> CONNECT TARGET /;
connected to target database: INDIAN (DBID=1449158500)
RMAN>
run {
RESTORE DATAFILE 7 FROM TAG 'TAG20041230T125410';
RECOVER DATAFILE 7;
SQL "ALTER DATABASE DATAFILE 7 ONLINE";
}
7. Once the patched datafile has been restored, select from table EMP works as expected:
SQL> SELECT COUNT(*) FROM scott.EMP;
COUNT(*)
--------
1536
Responses