HOME > > HOW TO PERFORM BLOCK MEDIA RECOVERY WHEN BACKUPS ARE NOT TAKEN BY RMAN.

HOW TO PERFORM BLOCK MEDIA RECOVERY WHEN BACKUPS ARE NOT TAKEN BY RMAN.

Anup - Thursday, April 8, 2010
To Perform Block Media Recovery when there are OS-backups available, but NO RMAN backups.

Consider that a block corruption is reported in the database and the corruption is not wide spread.

Since RMAN is not used in the database the initial solution would be to restore the file from backup and then recover. But this method will require the file should be offline during the entire process. On the other hand if BMR can be used, the file does not need to be taken offline.

Step 1 : Identify the backup of the datafilefile which has the corrupted block(s) and catalog it within RMAN.

Example: Backup is /u01/backup/users01.dbf

$ export ORACLE_SID=orcl
$ RMAN target=/
RMAN> catalog datafilecopy ‘/u01/backup/users01.dbf’;

Step 2 : Check the archived redologs.

RMAN is using the archived redologs which are known in V$ARCHIVED_LOG. If the archivelog files are not reported in V$ARCHIVED_LOG because they are moved to another location, or aged out of the controlfile, then they need to be cataloged as well.

First verify the existing archived redologs :
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;

Then catalog the unknown archived redologs :
RMAN> catalog archivelog ‘/u01/backup/archivelog/Arch_ocl_1_30.dbf’

Step 3 : Preform the Block Media Recovery

Having datafile(s) and all required archivelogs cataloged, we can run BMR as follows.

Example for a block recovery of blocks 99, 100, 101 in datafile 5

RMAN> blockrecover datafile 5 block 99,100,101;

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me