Tuesday 5 March 2024

RMAN-06136: Oracle error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed

 Dear All,


In this post i am going to show you RMAN Duplicate database clone errors fixup on Oracle database 19C .


while im doing RAC to Non RAC clone i faced this error on Target server .


[oracle@uatdb01 ~]$ rman auxiliary /


Recovery Manager: Release 19.0.0.0.0 - Production on Wed Mar 6 09:06:18 2024

Version 19.22.0.0.0


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


connected to auxiliary database: UATDB (not mounted)


RMAN> duplicate database to 'UATDB' backup location '/u01/Backup' nofilenamecheck;


Starting Duplicate Db at 06-MAR-24

searching for database ID

found backup of database ID 1143261986



RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of Duplicate Db command at 03/06/2024 09:09:00

RMAN-05501: aborting duplication of target database

RMAN-06136: Oracle error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed

ORA-00349: failure obtaining block size for '+DATA'

ORA-29701: unable to connect to Cluster Synchronization Service

ORA-29701: unable to connect to Cluster Synchronization Service

ORA-29701: unable to connect to Cluster Synchronization Service



Solution for the above error :

Add below values in parameter file on target server ..  update the correct path for your datafile and logfiles location in target side parameter .. that will resolve the below error .

*.cluster_database=FALSE

#*.control_files='/u01/app/oracle/oradata/UATDB/control01.ctl','/u01/app/oracle/fast_recovery_area/UATDB/control02.ctl'
*.db_file_name_convert='+DATA/RACSDB/DATAFILE','/u01/app/oracle/oradata/UATDB'
*.log_file_name_convert='+DATA/RACSDB/ONLINELOG','/u01/app/oracle/oradata/UATDB','+ARCH/RACSDB/ONLINELOG','/u01/app/oracle/oradata/UATDB'


After that restart the duplicate command 

RMAN> duplicate database to 'UATDB' backup location '/u01/Backup' nofilenamecheck;



Starting Duplicate Db at 06-MAR-24
searching for database ID
found backup of database ID 1143261986

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1912602056 bytes

Fixed Size                     8941000 bytes
Variable Size                436207616 bytes
Database Buffers            1459617792 bytes
Redo Buffers                   7835648 bytes

contents of Memory Script:
{
   sql clone "alter system set  control_files =
  ''/u01/app/oracle/fast_recovery_area/UATDB/controlfile/o1_mf_lyhstm01_.ctl'' comment=
 ''Set by RMAN'' scope=spfile";
   sql clone "alter system set  db_name =
 ''RACSDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''UATDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u01/Backup/c-1143261986-20240306-00';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''/u01/app/oracle/fast_recovery_area/UATDB/controlfile/o1_mf_lyhstm01_.ctl'' comment= ''Set by RMAN'' scope=spfile

sql statement: alter system set  db_name =  ''RACSDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''UATDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1912602056 bytes

Fixed Size                     8941000 bytes
Variable Size                436207616 bytes
Database Buffers            1459617792 bytes
Redo Buffers                   7835648 bytes

Starting restore at 06-MAR-24
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=34 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=/u01/app/oracle/fast_recovery_area/UATDB/controlfile/o1_mf_lyhstm01_.ctl
Finished restore at 06-MAR-24

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=34 device type=DISK
RMAN-05158: WARNING: auxiliary (tempfile) file name +DATA/RACSDB/TEMPFILE/temp.264.1159692461 conflicts with a file used by the target database
RMAN-05529: warning: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

contents of Memory Script:
{
   set until scn  7634718;
   set newname for datafile  1 to
 "/u01/app/oracle/oradata/UATDB/system.257.1159692337";
   set newname for datafile  3 to
 "/u01/app/oracle/oradata/UATDB/sysaux.258.1159692373";
   set newname for datafile  4 to
 "/u01/app/oracle/oradata/UATDB/undotbs1.259.1159692387";
   set newname for datafile  5 to
 "/u01/app/oracle/oradata/UATDB/undotbs2.265.1159692665";
   set newname for datafile  7 to
 "/u01/app/oracle/oradata/UATDB/users.260.1159692389";
   restore
   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

Starting restore at 06-MAR-24
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/UATDB/system.257.1159692337
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/UATDB/sysaux.258.1159692373
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/UATDB/undotbs1.259.1159692387
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/UATDB/undotbs2.265.1159692665
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/UATDB/users.260.1159692389
channel ORA_AUX_DISK_1: reading from backup piece /u01/Backup/1143261986-20240306-022l0f0a_2_1_1
channel ORA_AUX_DISK_1: piece handle=/u01/Backup/1143261986-20240306-022l0f0a_2_1_1 tag=TAG20240306T075553
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 06-MAR-24

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=1162891149 file name=/u01/app/oracle/oradata/UATDB/system.257.1159692337
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=1162891149 file name=/u01/app/oracle/oradata/UATDB/sysaux.258.1159692373
datafile 4 switched to datafile copy
input datafile copy RECID=8 STAMP=1162891149 file name=/u01/app/oracle/oradata/UATDB/undotbs1.259.1159692387
datafile 5 switched to datafile copy
input datafile copy RECID=9 STAMP=1162891149 file name=/u01/app/oracle/oradata/UATDB/undotbs2.265.1159692665
datafile 7 switched to datafile copy
input datafile copy RECID=10 STAMP=1162891149 file name=/u01/app/oracle/oradata/UATDB/users.260.1159692389

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

executing command: SET until clause

Starting recover at 06-MAR-24
using channel ORA_AUX_DISK_1

starting media recovery

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=46
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=2 sequence=36
channel ORA_AUX_DISK_1: reading from backup piece /u01/Backup/1143261986-20240306-032l0f2d_3_1_1
channel ORA_AUX_DISK_1: piece handle=/u01/Backup/1143261986-20240306-032l0f2d_3_1_1 tag=TAG20240306T075701
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u01/app/oracle/fast_recovery_area/UATDB/archivelog/2024_03_06/o1_mf_1_46_lyhsxpdr_.arc thread=1 sequence=46
archived log file name=/u01/app/oracle/fast_recovery_area/UATDB/archivelog/2024_03_06/o1_mf_2_36_lyhsxpgb_.arc thread=2 sequence=36
channel clone_default: deleting archived log(s)
archived log file name=/u01/app/oracle/fast_recovery_area/UATDB/archivelog/2024_03_06/o1_mf_1_46_lyhsxpdr_.arc RECID=2 STAMP=1162891151
channel clone_default: deleting archived log(s)
archived log file name=/u01/app/oracle/fast_recovery_area/UATDB/archivelog/2024_03_06/o1_mf_2_36_lyhsxpgb_.arc RECID=1 STAMP=1162891150
media recovery complete, elapsed time: 00:00:00
Finished recover at 06-MAR-24
Oracle instance started

Total System Global Area    1912602056 bytes

Fixed Size                     8941000 bytes
Variable Size                436207616 bytes
Database Buffers            1459617792 bytes
Redo Buffers                   7835648 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''UATDB'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
}
executing Memory Script

sql statement: alter system set  db_name =  ''UATDB'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance started

Total System Global Area    1912602056 bytes

Fixed Size                     8941000 bytes
Variable Size                436207616 bytes
Database Buffers            1459617792 bytes
Redo Buffers                   7835648 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "UATDB" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP     1 ( '/u01/app/oracle/oradata/UATDB/group_1.257.1159692457', '/u01/app/oracle/oradata/UATDB/group_1.262.1159692455' ) SIZE 200 M  REUSE,
  GROUP     2 ( '/u01/app/oracle/oradata/UATDB/group_2.258.1159692457', '/u01/app/oracle/oradata/UATDB/group_2.263.1159692455' ) SIZE 200 M  REUSE
 DATAFILE
  '/u01/app/oracle/oradata/UATDB/system.257.1159692337'
 CHARACTER SET AL32UTF8

sql statement: ALTER DATABASE ADD LOGFILE

  INSTANCE 'i2'
  GROUP     3 ( '/u01/app/oracle/oradata/UATDB/group_3.266.1159692729', '/u01/app/oracle/oradata/UATDB/group_3.259.1159692729' ) SIZE 200 M  REUSE,
  GROUP     4 ( '/u01/app/oracle/oradata/UATDB/group_4.267.1159692729', '/u01/app/oracle/oradata/UATDB/group_4.260.1159692729' ) SIZE 200 M  REUSE

contents of Memory Script:
{
   set newname for tempfile  1 to
 "+DATA";
   switch clone tempfile all;
   catalog clone datafilecopy  "/u01/app/oracle/oradata/UATDB/sysaux.258.1159692373",
 "/u01/app/oracle/oradata/UATDB/undotbs1.259.1159692387",
 "/u01/app/oracle/oradata/UATDB/undotbs2.265.1159692665",
 "/u01/app/oracle/oradata/UATDB/users.260.1159692389";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +DATA in control file

cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/UATDB/sysaux.258.1159692373 RECID=1 STAMP=1162891171
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/UATDB/undotbs1.259.1159692387 RECID=2 STAMP=1162891171
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/UATDB/undotbs2.265.1159692665 RECID=3 STAMP=1162891171
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/UATDB/users.260.1159692389 RECID=4 STAMP=1162891171

datafile 3 switched to datafile copy
input datafile copy RECID=1 STAMP=1162891171 file name=/u01/app/oracle/oradata/UATDB/sysaux.258.1159692373
datafile 4 switched to datafile copy
input datafile copy RECID=2 STAMP=1162891171 file name=/u01/app/oracle/oradata/UATDB/undotbs1.259.1159692387
datafile 5 switched to datafile copy
input datafile copy RECID=3 STAMP=1162891171 file name=/u01/app/oracle/oradata/UATDB/undotbs2.265.1159692665
datafile 7 switched to datafile copy
input datafile copy RECID=4 STAMP=1162891171 file name=/u01/app/oracle/oradata/UATDB/users.260.1159692389

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Cannot remove created server parameter file
Finished Duplicate Db at 06-MAR-24

RMAN> 

Do the post restore steps .. 



Thanks,
Srini





No comments:

Post a Comment


No one has ever become poor by giving