Thursday, May 17, 2012

How to Resume a Failed RMAN Duplicate Due to Missing Backups or ArchiveLogs

It is relatively easy to resume the rman restore and recovery process if it has failed due to missing backups or archivelogs.  You most often see the following error messages complaining that something is missing. RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/24/2010 12:52:44
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 6253 lowscn 1663211060 found to restore

You may have forgotten to copy them over to the same local disk location and/or  failed to restore due to tape issues. After you are sure that you have everything you need in the location RMAN expects them,  shutdown the database that is being duplicated (this is assumed that the controlfile has been restored and the database mounted), start it backup in nomount mode and just rerun the same commands.

RMAN automatically (tested using Oracle RDBMS Enterprise Edition 10.2.0.4) runs through the commands and continues the restore and recovery process from where it left off.

For example: There was a gap in the archive logs in the flash recovery area. I have an alternate archive destination that contains the missing log.
After the first duplicate command failed, I used RMAN to catalog the existence of the  missing log:
CATALOG ARCHIVELOG '/u01/arc/ORACLE_SID/1_6253_DBID.arc';
see MOS Document: How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies [ID 470463.1]  Then shutdown, startup nomount the database being duplicated. Reran the exact same duplicate command:
archive log thread 1 sequence 6251 is already on disk as file /backup/flash_recovery_area/ORACLE_SID/archivelog/2010_05_22/o1_mf_1_6251_5zk173bs_.arc
archive log thread 1 sequence 6252 is already on disk as file /backup/flash_recovery_area/ORACLE_SID/archivelog/2010_05_22/o1_mf_1_6252_5zkhfw99_.arc
archive log thread 1 sequence 6253 is already on disk as file /u01/arc/ORACLE_SID/1_6253_DBID.arc
archive log thread 1 sequence 6254 is already on disk as file /backup/flash_recovery_area/ORACLE_SID/archivelog/2010_05_23/o1_mf_1_6254_5zl68htc_.arc
As you can see from the above output…that it applies the archive logs including the single cataloged piece in the alternate location.  This may save someone else time and trouble when they have the same issue.

 

No comments:

Post a Comment