RMAN-05001: auxiliary file name conflicts with a file used by the target database


RMAN-05001: auxiliary file name <file_name> conflicts with a file used by the target database

I ran into an issue where I was trying to clone a new copy of non-production database (using production database as the source) by leveraging the RMAN clone via active database to save me some time and work.  

I ran into the error where I couldn't successfully clone the database.  I made sure that my environment, pfile, RMAN script were configured correctly.  After much time of troubleshooting, I figured out the issue. After remembering that the source database had a DG environment, it occurred to me that was what was causing the error.  Reason being, the source had log_file_name_convert and db_file_name_convert configured which was being "carried over" onto my auxiliary instance hence causing the error mentioned above.  So all I needed to do was simply reset those two parameters within my RMAN script (as seen below) and I was able to successfully clone the database without issues.

Hopefully, this helps someone save a lot of time and effort with troubleshooting. 


run {
allocate channel prm1 type disk;
allocate channel prm2 type disk;
allocate channel prm3 type disk;
allocate channel prm4 type disk;
allocate channel prm5 type disk;
allocate channel prm6 type disk;
allocate auxiliary channel stb1 type disk;
DUPLICATE TARGET DATABASE TO <db_name>
  FROM ACTIVE DATABASE
  SPFILE
    SET CONTROL_FILES='+DATA_STG'
    SET DB_CREATE_FILE_DEST '+DATA'
    SET db_recovery_file_dest='+DATA'
    SET db_recovery_file_dest_size='100G'
    SET audit_file_dest='/app/oracle/admin/<db_name>/adump'
    reset db_file_name_convert
    reset log_file_name_convert
    reset log_archive_config
    reset log_archive_dest_2;
}


Comments

Popular posts from this blog

RMAN-10038: database session for channel prm3 terminated unexpectedly

ORA-17630: Mismatch in the remote file protocol version client 2 server 3

ORA-00338: log {n} of thread {n} is more recent than control file