Sunday, November 15, 2015

RMAN-05001 auxiliary filename string conflicts with a file used by the target database

If this error message is being returned during RMANDUPLICATE DATABASE command, it is because RMAN would try to created destination files at the same location where source database files exist; and since it cannot overwrite existing files, so it and returns error message. To avoid this error, NOFILENAME check option should be used with DUPLICATE command. Otherwise use one of the following to specify different file names

While duplicating a database using either from live database or using a backup of live database, you might face error RMAN-05001 as flows
Errors in memory script
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01507: database not mounted
ORA-06512: at "SYS.X$DBMS_RCVMAN", line 13662
ORA-06512: at line 1
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name +DATA/mydb/data01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/data02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/data03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/indx01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/indx02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/indx03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/indx04.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/trandata01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/trandata02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/trandata03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/trandata04.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/trandata05.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name +DATA/mydb/trandata06.dbf conflicts with a file used by the target database
The reason of this error message is inbuilt safety. Oracle thinks that it might overwrite the files accidentally while restoring/duplicating the source database. So it is actually a safety valve to avoid any accidental overwrite. To override the file destination check and to avoid this error, we can use “nofilenamecheck” clause in DUPLICATE database, as follows.
RMAN> duplicate database to TESTDB backup location '/backup/operatemp/' nofilenamecheck;

Using “nofilenamecheck” would make oracle to restore datafiles even if source and destination database datafiles location is same. Alter natively, if you want to change the location of datafiles, use following init parameters to direct files creation to a new/different destination than source.
Db_file_name_convert=’+DATA/MYDB/’,’+DATA/TESTDB’
Log_file_name_convert= ‘+RECO/MYDB’,’+RECO/TESTDB’
Control_files=’+DATA/TESTDB/control01.ctl’,’+DATA/TESTDB/control02.ctl’
Above parameters can also be used form within DUPLICATE command instead of putting in init file.



No comments:

Post a Comment

Popular Posts - All Times