Sunday, January 11, 2009

BLOCK RECOVER BY RMAN

Recover corrupt blocks in three datafiles
------------------------------------------

BLOCKRECOVER DATAFILE 2 BLOCK 12, 13;

BLOCKRECOVER DATAFILE 2 BLOCK 12,13 DATAFILE 3 BLOCK 5,98,99 DATAFILE 4 BLOCK 19;

Limit block recovery by restoration type

RUN {
BLOCKRECOVER DATAFILE 3 BLOCK 2,3,4,5 TABLESPACE sales DBA 4194405, 4194409, 4194412
FROM DATAFILECOPY;
}

Limit block recovery by backup tag
-----------------------------------

BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 FROM TAG "weekly_backup";

Limit block recovery by time
-----------------------------
BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 RESTORE UNTIL TIME 'SYSDATE-2';


Repair all corrupt blocks in the database
-----------------------------------------
BACKUP VALIDATE DATABASE;BLOCKRECOVER CORRUPTION LIST;

This command will find, list and then recover all corrupted blocks in the database using the gv$database_block_corruption view.

No comments: