1 - 2 minutes readHandling Block Corruption in ASM Enable Database

Reader Mode

 Find corruption report on Alert log file.
ORA-01578: ORACLE data block corrupted (file # 7, block # 65)
ORA-01110: data file 7: '+DB_DATA01/INDIAN/DATAFILE/USERS.267.3'
Action Plan:
1. Take the data file (7) offline.
SQL> alter database datafile 7 offline;
2. Use RMAN ‘BACKUP AS COPY DATAFILE’ command to extract the datafile from ASM onto the file system:
RMAN> CONNECT TARGET /;
connected to target database: INDIAN (DBID=1449158500)

RMAN> BACKUP AS COPY DATAFILE 7 FORMAT '/tmp/df_%f';

3. Now that the file is on the file system, the OS command dd can be used to extract the block from the copy of the datafile:
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.
5. Put the patched block back into df_7:
dd if=f7b65.dd of=df_7 bs=8192 seek=65 count=1 conv=notrunc
6. Restore the patched datafile from the file system back into ASM:
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

Related Articles

Responses

Your email address will not be published. Required fields are marked *

Password Reset
Please enter your e-mail address. You will receive a new password via e-mail.