Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Control file failed error while duplicating database using RMAN

MoazzamNov 12 2011 — edited Nov 12 2011
I am using oracle database 10g R2 and trying to make a clone of the source database orcl on the same machine but with different directory structure with the name of test.

When i run the duplicate command to create test database, then following error is generted:
D:\>rman target sys@orcl nocatalog auxiliary / 
 
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Nov 11 12:13:26 2011
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
target database Password:
connected to target database: ORCL (DBID=1264668332)
using target database control file instead of recovery catalog
connected to auxiliary database: TEST (not mounted)
 
RMAN> @script.txt
 
RMAN> Run {
2> Allocate channel C1 type disk;
3> allocate auxiliary channel 'adisk_0' type DISK;
4> duplicate target database to "test";
5> #BACKUP INCREMENTAL LEVEL 1 DATABASE;
6> #BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
7> #BACKUP INCREMENTAL LEVEL 0 DATABASE;
8> #delete obsolete;
9> }
allocated channel: C1
channel C1: sid=140 devtype=DISK
 
allocated channel: adisk_0
channel adisk_0: sid=157 devtype=DISK
 
Starting Duplicate Db at 11-NOV-11
 
contents of Memory Script:
{
   set until scn  12926250;
   set newname for datafile  1 to
 "D:\TEST\ORADATA\SYSTEM01.DBF";
   set newname for datafile  2 to
 "D:\TEST\ORADATA\UNDOTBS01.DBF";
   set newname for datafile  3 to
 "D:\TEST\ORADATA\SYSAUX01.DBF";
   set newname for datafile  4 to
 "D:\TEST\ORADATA\USERS01.DBF";
   set newname for datafile  5 to
 "D:\TEST\ORADATA\EXAMPLE01.DBF";
   set newname for datafile  6 to
 "D:\TEST\ORADATA\GL.DBF";
   restore
   check readonly
   clone database
   ;
}
executing Memory Script
 
executing command: SET until clause
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
Starting restore at 11-NOV-11
 
channel adisk_0: starting datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\TEST\ORADATA\SYSTEM01.DBF
restoring datafile 00002 to D:\TEST\ORADATA\UNDOTBS01.DBF
restoring datafile 00003 to D:\TEST\ORADATA\SYSAUX01.DBF
restoring datafile 00004 to D:\TEST\ORADATA\USERS01.DBF
restoring datafile 00005 to D:\TEST\ORADATA\EXAMPLE01.DBF
restoring datafile 00006 to D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ44MH4_.BKP tag=TAG20111107T220
channel adisk_0: restore complete, elapsed time: 00:01:46
Finished restore at 11-NOV-11
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP  1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M  REUSE,
  GROUP  2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M  REUSE,
  GROUP  3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M  REUSE
 DATAFILE
  'D:\TEST\ORADATA\SYSTEM01.DBF'
 CHARACTER SET WE8MSWIN1252
 
 
contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script
 
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=766930525 filename=D:\TEST\ORADATA\UNDOTBS01.DBF
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=766930525 filename=D:\TEST\ORADATA\SYSAUX01.DBF
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=766930526 filename=D:\TEST\ORADATA\USERS01.DBF
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=766930526 filename=D:\TEST\ORADATA\EXAMPLE01.DBF
datafile 6 switched to datafile copy
input datafile copy recid=5 stamp=766930526 filename=D:\TEST\ORADATA\GL.DBF
 
contents of Memory Script:
{
   set until scn  12926250;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script
 
executing command: SET until clause
 
Starting recover at 11-NOV-11
channel adisk_0: starting incremental datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7CO
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7COGJZVT_.BKP tag=TAG20111109T223
channel adisk_0: restore complete, elapsed time: 00:00:07
channel adisk_0: starting incremental datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR1MQFO_.BKP tag=TAG20111110T221
channel adisk_0: restore complete, elapsed time: 00:00:16
 
starting media recovery
 
archive log thread 1 sequence 524 is already on disk as file D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CS
C
archive log filename=D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CSG2HVT_.ARC thread=1 sequence=524
media recovery complete, elapsed time: 00:00:14
Finished recover at 11-NOV-11
 
contents of Memory Script:
{
   shutdown clone;
   startup clone nomount ;
}
executing Memory Script
 
database dismounted
Oracle instance shut down
 
connected to auxiliary database (not started)
Oracle instance started
 
Total System Global Area     230686720 bytes
 
Fixed Size                     1248236 bytes
Variable Size                 67109908 bytes
Database Buffers             155189248 bytes
Redo Buffers                   7139328 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP  1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M  REUSE,
  GROUP  2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M  REUSE,
  GROUP  3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M  REUSE
 DATAFILE
  'D:\TEST\ORADATA\SYSTEM01.DBF'
 CHARACTER SET WE8MSWIN1252
 
released channel: C1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/11/2011 12:16:21
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
 
RMAN> **end-of-file**
Script.txt
Run {
Allocate channel C1 type disk;
allocate auxiliary channel 'adisk_0' type DISK;
duplicate target database to "test";
}
Kindly help?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2011
Added on Nov 12 2011
2 comments
526 views