Hello,
I have been struggling with this for a 2-3 days now. I am trying to DUPLICATE srcDB to dupDB on the same host using backup-based method with no target connection and no recovery catalog. I am using 11.2.0.4.14 on Windows 2008 R2 64-bit and have poured through the documentation and can't figure out the problem. It appears that the LOG_FILE_NAME_CONVERT is not working. I would like the dupDB to have the same file names as the srcDB but with a new path (as depicted in the DB_FILE_NAME CONVERT options below).
TEXT PFILE AND COMPLETE LIST OF RMAN SESSION(s) output is attached. Ultimately, I want to be able to duplicate a DB and then refresh it on some regular basis using a simplified DUPLICATE command as alluded to the documentation. If anyone has a TEXT PARAMETER file and set of RMAN commands that they are willing to share that accomplishes what I am trying to do that would be great. Any help would be VERY MUCH appreciated!!! Thanks in advance!
HERE IS CONTENTS OF THE TEXT PARAMETER FILE (initdupDB.ora in the ORACLE_HOME\database folder) of THE DUP/AUX DB:
# Oracle init.ora parameter file created for RMAN Duplication on 04/28/2015 14:36:28
db_name='dupDB'
control_files='D:\APP\ORADATA\DUPDB\CONTROL01.CTL'
control_files='E:\FAST_RECOVERY_AREA\DUPDB\CONTROL02.CTL'
control_files='E:\ORADATA\DUPDB\CONTROL03.CTL'
compatible='11.2.0.4.14'
#LOG_FILE_NAME_CONVERT=('E:\oradata\srcDB\','E:\oradata\dupDB\')
#DB_FILE_NAME_CONVERT=('E:\oradata\srcDB\','E:\oradata\dupDB\')
compatible='11.2.0.4.14'
#control_files='D:\APP\ORADATA\DUPDB\CONTROL01.CTL'
#control_files='E:\FAST_RECOVERY_AREA\DUPDB\CONTROL02.CTL'
#control_files='E:\ORADATA\DUPDB\CONTROL03.CTL'
Here is the DUPLICATE COMMAND(s) I am using:
D:\>rman
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 28 17:41:59 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> CONNECT AUXILIARY sys/Redsue34
connected to auxiliary database: DUPDB (not mounted)
RMAN>
RMAN>
RMAN> DUPLICATE DATABASE srcDB DBID=512064757 TO 'dupDB'
2> PFILE='D:\app\product\11.2.0\dbhome_1\database\initdupDB.ora'
3> BACKUP LOCATION 'E:\fast_recovery_area'
4> DB_FILE_NAME_CONVERT 'E:\oradata\srcDB\','E:\oradata\dupDB\'
5> LOG_FILE_NAME_CONVERT 'E:\oradata\srcDB\', 'E:\oradata\dupDB\';
Starting Duplicate Db at 28-APR-15
HERE IS THE OUTPUT/RESULTING ERROR MESSAGE
sql statement: alter system set db_name = ''SRCDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''DUPDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 217157632 bytes
Fixed Size 2279824 bytes
Variable Size 159385200 bytes
Database Buffers 50331648 bytes
Redo Buffers 5160960 bytes
Starting restore at 28-APR-15
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=D:\APP\ORADATA\DUPDB\CONTROL01.CTL
output file name=E:\FAST_RECOVERY_AREA\DUPDB\CONTROL02.CTL
output file name=E:\ORADATA\DUPDB\CONTROL03.CTL
Finished restore at 28-APR-15
database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
restarting auxiliary database without server parameter file
Oracle instance started
Total System Global Area 217157632 bytes
Fixed Size 2279824 bytes
Variable Size 159385200 bytes
Database Buffers 50331648 bytes
Redo Buffers 5160960 bytes
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/28/2015 17:23:39
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name E:\ORADATA\SRCDB\REDO03.LOG conflicts with a file used by the target database
RMAN-05001: auxiliary file name E:\ORADATA\SRCDB\REDO02.LOG conflicts with a file used by the target database
RMAN-05001: auxiliary file name E:\ORADATA\SRCDB\REDO01.LOG conflicts with a file used by the target database
I HAVE ALSO RECEIVED THE FOLLOWING ERROR ON SOME ATTEMPTS - which I totally do not understand
restarting auxiliary database without server parameter file
Oracle instance started
Total System Global Area 217157632 bytes
Fixed Size 2279824 bytes
Variable Size 159385200 bytes
Database Buffers 50331648 bytes
Redo Buffers 5160960 bytes
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/28/2015 17:45:06
RMAN-05501: aborting duplication of target database
RMAN-06588: number of patterns (5) to DB_FILE_NAME_CONVERT should be even
RMAN>
Again, any help would be greatly appreciated!!!
Thanks in advance,
RayK