I got ” RMAN-05001 auxiliary filename string conflicts with a file used by the target database ” error in Oracle database.
RMAN-05001 auxiliary filename string conflicts with a file used by the target database
Details of error are as follows.
RMAN-05001 auxiliary filename string conflicts with a file used by the target database Cause: RMAN is attempting to use the specified file name as a restore destination in the auxiliary database, but this name is already in use by the target database. Action: Use the SET AUXNAME command to specify a name for the datafile that does not conflict with a file name in use by the target database
auxiliary filename string conflicts with a file used by the target database
This RMAN-05001 error is related with the RMAN is attempting to use the specified file name as a restore destination in the auxiliary database, but this name is already in use by the target database.
To solve this error, Use the SET AUXNAME command to specify a name for the datafile that does not conflict with a file name in use by the target database.
Production and Auxiliary have same directory structure and are running on two different machines. RMAN must be told not check that the target datafiles are sharing the same names as the duplicated files being created. Otherwise, the following errors will be returned:
RMAN-05001: auxiliary filename /<directory1/<name>.dbf conflicts with a file used by the target database RMAN-05001: auxiliary filename /<directory1/<name>.dbf
To implement the solution, please use nofilenamecheck in syntax as follows:
1. Connect to Target, auxiliary, and rman catalog and
2. use a script as
RMAN> run { set until time "to_date('2021/05/06 14:00:00','yyyy/mm/dd HH24:MI:SS')"; allocate auxiliary channel aux1 type 'sbt_tape'; allocate auxiliary channel aux2 type 'sbt_tape'; duplicate target database for standby dorecover nofilenamecheck; }
Make sure to use auxiliary type of channel so RMAN restore take place at auxiliary database.
Connecting to recovery catalog is optional here.
‘nofilenamecheck’ clause instructs rman not to check whether target database file names share the same name as auxiliary database
You should run the following command if you want to use duplicate target database command.
duplicate target database for standby nofilenamecheck;
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )