Wednesday, July 9, 2014

RMAN Duplicate Command gives, RMAN-05541: no archived logs found in target database


RMAN-05541: no archived logs found in target database

##########################
## Error
##########################

RMAN-05541: no archived logs found in target database

### Full Error

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/08/2014 18:12:40
RMAN-05501: aborting duplication of target database
RMAN-05541: no archived logs found in target database

##########################
#  Error Occurred
##########################

Error occured while a doing a duplication for a standby database using active database duplication in 11.2.0.3.0 version

##########################
## Command Executed
##########################

Duplicate command.

**************************************** Step By Step Analysis ******************************************************

#########################################
# 1) Check Archive Log Info
#########################################

#### In Primary (Target) database

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   1
Current log sequence           1
SQL>

=====================================================================================================================

#########################################
# 2) Reason for Failure
#########################################

Error is occuring in Primary (Target) database which is in archivelog mode but there is no archived log records in controlfile.

The primary database has been built newly and from Step 1) we can see that Current log sequence is 1.

So when RMAN tries to run duplication command it couldn't find any archive logs.

=====================================================================================================================

##########################
## Solution
##########################

Archive the current log before running duplication command, if the target database current sequence is 1.

Alter system archive log current;

( or )

Alter system switch logfile;

SQL> Alter system switch logfile;

System altered.

SQL>  archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   2
Current log sequence           2
SQL>

=====================================================================================================================
Now the duplication command has been run and its successful.
=====================================================================================================================

=====================================================================================================================
 Comments Are Always welcome
=====================================================================================================================



3 comments:

Unknown said...

first take backup archivelog all in duplicate database then aplied it.then aplied your duplicate command then alter database open resetlog;

SID said...

@Dinesh,

Thanks for your comments. The method you are saying is for normal duplication technique.

My post is about Active Database Duplication which doesn't need backup.

Anonymous said...

Still wondering why it fails at times while run as active duplication and it goes to success at times.