Monday, June 23, 2014

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

renamed tempfile 1 to /u04/oradata/orcl/12cdbtemp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u04/oradata/orcl/12cdbsystem01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u04/oradata/orcl/12cdbsysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u04/oradata/orcl/12cdbundotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u04/oradata/orcl/12cdbusers01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u04/oradata/orcl/12cdbexample01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 23-JUN-14

sql statement: alter system archive log current
current log archived
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/23/2014 18:36:03
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u03/fra/1_114_850736530.dbf conflicts with a file used by the target database
Resolution:- Included nofilenamecheck in the rman script the issue is resolved.

[oracle@ol6-112-rac2 rman]$ rman target="sys/sys123@ol6rac1" auxiliary="sys/sys123@ol6rac2"

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jun 23 19:19:20 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NEW12CDB (DBID=3192639891)
connected to auxiliary database: NEW12CDB (not mounted)

RMAN> @ rman_standby.cmd

RMAN> duplicate  database 'new12cdb' for standby
2> from active database
3> dorecover
4> spfile
5> set db_unique_name='ol6rac2'
6> set db_recovery_file_dest='/u04/oradata/orcl/fra'
7> set control_files='/u04/oradata/orcl/12cdb/control01.ctl','/u04/oradata/orcl/12cdb/control02.ctl'
8> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
9> set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
10> db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb'
11> nofilenamecheck;
Starting Duplicate Db at 23-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
current log archived

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb' auxiliary format
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb_dup'   ;
   restore clone from service  'ol6rac1' spfile to
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora';
   sql clone "alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora''";
}
executing Memory Script

Starting backup at 23-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 device type=DISK
Finished backup at 23-JUN-14

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring SPFILE
output file name=/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 23-JUN-14

sql statement: alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora''

contents of Memory Script:
{
   sql clone "alter system set  db_unique_name =
 ''ol6rac2'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_recovery_file_dest =
 ''/u04/oradata/orcl/fra'' comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files =
 ''/u04/oradata/orcl/12cdb/control01.ctl'', ''/u04/oradata/orcl/12cdb/control02.ctl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  audit_file_dest =
 ''/u01/app/orcl/oracle/admin/new12cdb/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert =
 ''/u03/fra/NEW12CDB/onlinelog'', ''/u04/oradata/orcl/12cdb'' comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_unique_name =  ''ol6rac2'' comment= '''' scope=spfile

sql statement: alter system set  db_recovery_file_dest =  ''/u04/oradata/orcl/fra'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''/u04/oradata/orcl/12cdb/control01.ctl'', ''/u04/oradata/orcl/12cdb/control02.ctl'' comment= '''' scope=spfile

sql statement: alter system set  audit_file_dest =  ''/u01/app/orcl/oracle/admin/new12cdb/adump'' comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''/u03/fra/NEW12CDB/onlinelog'', ''/u04/oradata/orcl/12cdb'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                671089920 bytes
Database Buffers             390070272 bytes
Redo Buffers                   5480448 bytes

contents of Memory Script:
{
   restore clone from service  'ol6rac1' standby controlfile;
}
executing Memory Script

Starting restore at 23-JUN-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
output file name=/u04/oradata/orcl/12cdb/control01.ctl
output file name=/u04/oradata/orcl/12cdb/control02.ctl
Finished restore at 23-JUN-14

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u04/oradata/orcl/12cdbtemp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u04/oradata/orcl/12cdbsystem01.dbf";
   set newname for datafile  2 to
 "/u04/oradata/orcl/12cdbsysaux01.dbf";
   set newname for datafile  3 to
 "/u04/oradata/orcl/12cdbundotbs01.dbf";
   set newname for datafile  4 to
 "/u04/oradata/orcl/12cdbusers01.dbf";
   set newname for datafile  5 to
 "/u04/oradata/orcl/12cdbexample01.dbf";
   restore
   from service  'ol6rac1'   clone database
   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u04/oradata/orcl/12cdbtemp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u04/oradata/orcl/12cdbsystem01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u04/oradata/orcl/12cdbsysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:05
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u04/oradata/orcl/12cdbundotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u04/oradata/orcl/12cdbusers01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u04/oradata/orcl/12cdbexample01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 23-JUN-14

sql statement: alter system archive log current
current log archived

contents of Memory Script:
{
   restore clone force from service  'ol6rac1'
           archivelog from scn  2396220;
   switch clone datafile all;
}
executing Memory Script

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=126
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=127
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 23-JUN-14

datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=851023774 file name=/u04/oradata/orcl/12cdbsystem01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=6 STAMP=851023775 file name=/u04/oradata/orcl/12cdbsysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=851023775 file name=/u04/oradata/orcl/12cdbundotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=8 STAMP=851023775 file name=/u04/oradata/orcl/12cdbusers01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=9 STAMP=851023775 file name=/u04/oradata/orcl/12cdbexample01.dbf

contents of Memory Script:
{
   set until scn  2397480;
   recover
   standby
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 23-JUN-14
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 126 is already on disk as file /u03/fra/1_126_850736530.dbf
archived log for thread 1 with sequence 127 is already on disk as file /u03/fra/1_127_850736530.dbf
archived log file name=/u03/fra/1_126_850736530.dbf thread=1 sequence=126
archived log file name=/u03/fra/1_127_850736530.dbf thread=1 sequence=127
media recovery complete, elapsed time: 00:00:05
Finished recover at 23-JUN-14
Finished Duplicate Db at 23-JUN-14

RMAN>
RMAN> **end-of-file**


No comments: