Mar 5, 2020

RMAN-06053: unable to perform media recovery because of missing log - Fix

During creating a duplicate database, I faced below error but for me consistent recovery is not required. We need to open the database but how?

Error Message:

Oracle instance shut down
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/04/2020 11:19:22
RMAN-05501: aborting duplication of target database
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 archived log for thread 1 with sequence 652548 and starting SCN of 26787010633 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 652547 and starting SCN of 26787010507 found to restore
RMAN-00567: Recovery Manager could not print some error messages

Recovery Manager complete.

From the error, it is seen, required archivelog is not available with backup.

Root-cause of this problem:

The backup is not sufficient to complete the duplicate command, its an old backup.
more log files are needed to complete.

-- Recover up to available log sequence 652547 but not including log 652547.

$ rman auxiliary / catalog catuser/Pas$w0rd@catdb

RUN
{
allocate auxiliary channel c0 device type disk;
SET UNTIL SEQUENCE 652547 THREAD 1;
duplicate database 'TESTDB' to 'DEMODB' nofilenamecheck;
}

If you are facing same archivelog missing errors, then change the script once gain to that log sequence and run the command after starting the database in nomount.

attaching last few lines:

RMAN-06025: no backup of archived log for thread 1 with sequence 652304 and starting SCN of 26786392356 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 652303 and starting SCN of 26786382438 found to restore
RMAN-00567: Recovery Manager could not print some error messages

-- Again tried after failure

rman auxiliary / catalog catuser/Pas$w0rd@catdb

RUN
{
allocate auxiliary channel c0 device type disk;
SET UNTIL SEQUENCE 652303 THREAD 1;
duplicate database 'TESTDB' to 'DEMODB' nofilenamecheck;
}

Captured last few lines when successfully completed.

input datafile copy RECID=228 STAMP=1034165624 file name=/u05/oradata/DEMODB/datafile/o1_mf_test_data_h5zdp8oo_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=232 STAMP=1034165624 file name=/u05/oradata/DEMODB/datafile/o1_mf_users_h5zjbptz_.dbf
Reenabling controlfile options for auxiliary database
Executing: alter database enable block change tracking

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 04-Mar-2020 12:13:55

RMAN> 
RMAN> 


-- verify

SQL> select name,open_mode from v$database;

NAME                 OPEN_MODE
-----------------    --------------------
DEMODB               READ-WRITE




No comments:

Post a Comment

Translate >>