4 Replies Latest reply: Aug 8, 2012 8:53 AM by Sebastian Solbach -Dba Community-Oracle RSS

    Problems doing an active Database duplication through RMAN

    CSM.DBA
      Hi,

      I'm trying to do active Database duplication through RMAN (http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#).

      My OS is Sun Solaris 5
      Oracle version: 11gR1 Database on a 11gR2 Grid.

      I'm receiving the error

      RMAN> connect auxiliary sys/sys@rac402

      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections

      I'm seeing the listeners are in blocked state as mt auxiliary Database is in nomount state.

      Service "rac40" has 1 instance(s).
      Instance "rac402", status BLOCKED, has 1 handler(s) for this service...
      Service "rac40_XPT" has 1 instance(s).
      Instance "rac402", status BLOCKED, has 1 handler(s) for this service...

      If I connect directly, I'm able to connect ("connect auxiliary / " after setting ORACLE_SID)

      But active RMAN is saying

      RMAN-03002: failure of Duplicate Db command at 06/18/2012 01:37:14
      RMAN-06217: not connected to auxiliary database with a net service name (I don't know why Oracle is so specific in connecting through net service name only!!!)

      So, how could I move forward?? any help is greatly appreciated!!!

      Thanks in advance.

      Regards,
      CSM
        • 1. Re: Problems doing an active Database duplication through RMAN
          944213
          Dont go for dynamic service registration, add a fixed entry in listener.ora and try again.

          Cheers,
          lkmthedba
          • 2. Re: Problems doing an active Database duplication through RMAN
            CKPT
            RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections
            Post your tnsnames of "rac402"

            Make changes as below and retry
            prod =
              (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
                (CONNECT_DATA =
                  (SERVER = DEDICATED)
                  "(SERVICE_NAME = prod)(UR=A)"
                )
              )
            • 3. Re: Problems doing an active Database duplication through RMAN
              953146
              Hi ,
              I have issue to active Database duplication issue and getting below error. Can someone suggest something on this error ?

              RMAN> duplicate target database to 'ub305' from active database;

              Starting Duplicate Db at 07-AUG-2012 13:33:22
              allocated channel: ORA_AUX_DISK_1
              channel ORA_AUX_DISK_1: SID=2 device type=DISK

              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 21512572928 bytes

              Fixed Size 2235984 bytes
              Variable Size 11005854128 bytes
              Database Buffers 10468982784 bytes
              Redo Buffers 35500032 bytes

              contents of Memory Script:
              {
              sql clone "alter system set control_files =
              ''+DG_075_DATA01/ub305/controlfile/current.345.790692287'', ''+DG_075_FRA01/ub305/controlfile/current.292.790692289'' comment=
              ''Set by RMAN'' scope=spfile";
              sql clone "alter system set db_name =
              ''UA305'' comment=
              ''Modified by RMAN duplicate'' scope=spfile";
              sql clone "alter system set db_unique_name =
              ''UB305'' comment=
              ''Modified by RMAN duplicate'' scope=spfile";
              shutdown clone immediate;
              startup clone force nomount
              backup as copy current controlfile auxiliary format '+DG_075_DATA01/ub305/controlfile/current.345.790692287';
              restore clone controlfile to '+DG_075_FRA01/ub305/controlfile/current.292.790692289' from
              '+DG_075_DATA01/ub305/controlfile/current.345.790692287';
              sql clone "alter system set control_files =
              ''+DG_075_DATA01/ub305/controlfile/current.345.790692287'', ''+DG_075_FRA01/ub305/controlfile/current.292.790692289'' comment=
              ''Set by RMAN'' scope=spfile";
              shutdown clone immediate;
              startup clone nomount;
              alter clone database mount;
              }
              executing Memory Script

              sql statement: alter system set control_files = ''+DG_075_DATA01/ub305/controlfile/current.345.790692287'', ''+DG_075_FRA01/ub305/controlfile/current.292.790692289'' comment= ''Set by RMAN'' scope=spfile

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

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

              Oracle instance shut down

              Oracle instance started

              Total System Global Area 21512572928 bytes

              Fixed Size 2235984 bytes
              Variable Size 11005854128 bytes
              Database Buffers 10468982784 bytes
              Redo Buffers 35500032 bytes

              Starting backup at 07-AUG-2012 13:34:11
              allocated channel: ORA_DISK_1
              channel ORA_DISK_1: SID=1333 instance=ua3051 device type=DISK
              channel ORA_DISK_1: starting datafile copy
              copying current control file
              output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ua3051.f tag=TAG20120807T133412 RECID=17 STAMP=790695252
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
              Finished backup at 07-AUG-2012 13:34:15

              Starting restore at 07-AUG-2012 13:34:15
              allocated channel: ORA_AUX_DISK_1
              channel ORA_AUX_DISK_1: SID=2 device type=DISK

              channel ORA_AUX_DISK_1: copied control file copy
              Finished restore at 07-AUG-2012 13:34:16

              sql statement: alter system set control_files = ''+DG_075_DATA01/ub305/controlfile/current.345.790692287'', ''+DG_075_FRA01/ub305/controlfile/current.292.790692289'' comment= ''Set by RMAN'' scope=spfile

              Oracle instance shut down

              connected to auxiliary database (not started)
              Oracle instance started

              Total System Global Area 21512572928 bytes

              Fixed Size 2235984 bytes
              Variable Size 11005854128 bytes
              Database Buffers 10468982784 bytes
              Redo Buffers 35500032 bytes

              database mounted
              RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

              contents of Memory Script:
              {
              set newname for datafile 1 to
              "+dg_075_data01";
              set newname for datafile 2 to
              "+dg_075_data01";
              set newname for datafile 3 to
              "+dg_075_data01";
              set newname for datafile 4 to
              "+dg_075_data01";
              set newname for datafile 5 to
              "+dg_075_data01";
              set newname for datafile 6 to
              "+dg_075_data01";
              set newname for datafile 7 to
              "+dg_075_data01";
              set newname for datafile 8 to
              "+DG_075_DATA01/ub305/datafile/ts001_rsa.ora";
              backup as copy reuse
              datafile 1 auxiliary format
              "+dg_075_data01" datafile
              2 auxiliary format
              "+dg_075_data01" datafile
              3 auxiliary format
              "+dg_075_data01" datafile
              4 auxiliary format
              "+dg_075_data01" datafile
              5 auxiliary format
              "+dg_075_data01" datafile
              6 auxiliary format
              "+dg_075_data01" datafile
              7 auxiliary format
              "+dg_075_data01" datafile
              8 auxiliary format
              "+DG_075_DATA01/ub305/datafile/ts001_rsa.ora" ;
              sql 'alter system archive log current';
              }
              executing Memory Script

              executing command: SET NEWNAME

              executing command: SET NEWNAME

              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 backup at 07-AUG-2012 13:34:46
              using channel ORA_DISK_1
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00008 name=+DG_305_DATA01/ua305/datafile/ts001_rsa.ora
              output file name=+DG_075_DATA01/ub305/datafile/ts001_rsa.ora tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00001 name=+DG_305_DATA01/ua305/datafile/system.256.788357663
              output file name=+DG_075_DATA01/ub305/datafile/system.322.790695353 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00002 name=+DG_305_DATA01/ua305/datafile/sysaux.257.788357663
              output file name=+DG_075_DATA01/ub305/datafile/sysaux.321.790695359 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00007 name=+DG_305_DATA01/ua305/datafile/ata_apm.271.788369355
              output file name=+DG_075_DATA01/ub305/datafile/ata_apm.320.790695367 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00003 name=+DG_305_DATA01/ua305/datafile/undotbs1.258.788357663
              output file name=+DG_075_DATA01/ub305/datafile/undotbs1.319.790695373 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00004 name=+DG_305_DATA01/ua305/datafile/users.259.788357663
              output file name=+DG_075_DATA01/ub305/datafile/users.316.790695377 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00005 name=+DG_305_DATA01/ua305/datafile/undotbs2.264.788357815
              output file name=+DG_075_DATA01/ub305/datafile/undotbs2.315.790695381 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
              channel ORA_DISK_1: starting datafile copy
              input datafile file number=00006 name=+DG_305_DATA01/ua305/datafile/ata_mds.270.788369353
              output file name=+DG_075_DATA01/ub305/datafile/ata_mds.314.790695383 tag=TAG20120807T133447
              channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
              Finished backup at 07-AUG-2012 13:36:24

              sql statement: alter system archive log current

              contents of Memory Script:
              {
              backup as copy reuse
              archivelog like "+DG_305_FRA01/ua305/archivelog/2012_08_07/thread_1_seq_223.572.790694523" auxiliary format
              "+DG_075_FRA01" archivelog like
              "+DG_305_FRA01/ua305/archivelog/2012_08_07/thread_1_seq_224.573.790695385" auxiliary format
              "+DG_075_FRA01" archivelog like
              "+DG_305_FRA01/ua305/archivelog/2012_08_07/thread_2_seq_91.574.790695387" auxiliary format
              "+DG_075_FRA01" ;
              catalog clone recovery area;
              switch clone datafile all;
              }
              executing Memory Script

              Starting backup at 07-AUG-2012 13:36:30
              using channel ORA_DISK_1
              channel ORA_DISK_1: starting archived log copy
              input archived log thread=1 sequence=223 RECID=311 STAMP=790694522
              output file name=+DG_075_FRA01/ub305/archivelog/2012_08_07/thread_1_seq_223.299.790695391 RECID=0 STAMP=0
              channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
              channel ORA_DISK_1: starting archived log copy
              input archived log thread=1 sequence=224 RECID=312 STAMP=790695384
              output file name=+DG_075_FRA01/ub305/archivelog/2012_08_07/thread_1_seq_224.267.790695393 RECID=0 STAMP=0
              channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
              channel ORA_DISK_1: starting archived log copy
              input archived log thread=2 sequence=91 RECID=313 STAMP=790695386
              output file name=+DG_075_FRA01/ub305/archivelog/2012_08_07/thread_2_seq_91.283.790695393 RECID=0 STAMP=0
              channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
              Finished backup at 07-AUG-2012 13:36:34

              searching for all files in the recovery area

              List of Files Unknown to the Database
              =====================================
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_220.279.790692475
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_221.312.790692477
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_222.311.790692479
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_89.310.790692479
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_89.309.790694525
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_90.261.790694527
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_223.262.790694527
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_223.299.790695391
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_224.267.790695393
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_91.283.790695393
              File Name: +dg_075_fra01/UB305/CONTROLFILE/Current.289.790692289
              cataloging files...
              cataloging done

              List of Cataloged Files
              =======================
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_220.279.790692475
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_221.312.790692477
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_222.311.790692479
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_89.310.790692479
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_89.309.790694525
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_90.261.790694527
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_223.262.790694527
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_223.299.790695391
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_1_seq_224.267.790695393
              File Name: +dg_075_fra01/UB305/ARCHIVELOG/2012_08_07/thread_2_seq_91.283.790695393

              List of Files Which Where Not Cataloged
              =======================================
              File Name: +dg_075_fra01/UB305/CONTROLFILE/Current.289.790692289
              RMAN-07517: Reason: The file header is corrupted

              datafile 1 switched to datafile copy
              input datafile copy RECID=17 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/system.322.790695353
              datafile 2 switched to datafile copy
              input datafile copy RECID=18 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/sysaux.321.790695359
              datafile 3 switched to datafile copy
              input datafile copy RECID=19 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/undotbs1.319.790695373
              datafile 4 switched to datafile copy
              input datafile copy RECID=20 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/users.316.790695377
              datafile 5 switched to datafile copy
              input datafile copy RECID=21 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/undotbs2.315.790695381
              datafile 6 switched to datafile copy
              input datafile copy RECID=22 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/ata_mds.314.790695383
              datafile 7 switched to datafile copy
              input datafile copy RECID=23 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/ata_apm.320.790695367
              datafile 8 switched to datafile copy
              input datafile copy RECID=24 STAMP=790695395 file name=+DG_075_DATA01/ub305/datafile/ts001_rsa.ora

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

              executing command: SET until clause

              Starting recover at 07-AUG-2012 13:36:35
              allocated channel: ORA_AUX_DISK_1
              channel ORA_AUX_DISK_1: SID=191 device type=DISK

              starting media recovery

              archived log for thread 1 with sequence 224 is already on disk as file +DG_075_FRA01/ub305/archivelog/2012_08_07/thread_1_seq_224.267.790695393
              archived log for thread 2 with sequence 91 is already on disk as file +DG_075_FRA01/ub305/archivelog/2012_08_07/thread_2_seq_91.283.790695393
              archived log file name=+DG_075_FRA01/ub305/archivelog/2012_08_07/thread_1_seq_224.267.790695393 thread=1 sequence=224
              archived log file name=+DG_075_FRA01/ub305/archivelog/2012_08_07/thread_2_seq_91.283.790695393 thread=2 sequence=91
              media recovery complete, elapsed time: 00:00:01
              Finished recover at 07-AUG-2012 13:36:38
              Oracle instance started

              Total System Global Area 21512572928 bytes

              Fixed Size 2235984 bytes
              Variable Size 11005854128 bytes
              Database Buffers 10468982784 bytes
              Redo Buffers 35500032 bytes

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

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

              sql statement: alter system reset db_unique_name scope=spfile

              Oracle instance shut down

              connected to auxiliary database (not started)
              Oracle instance started

              Total System Global Area 21512572928 bytes

              Fixed Size 2235984 bytes
              Variable Size 11005854128 bytes
              Database Buffers 10468982784 bytes
              Redo Buffers 35500032 bytes
              sql statement: CREATE CONTROLFILE REUSE SET DATABASE "UB305" RESETLOGS ARCHIVELOG
              MAXLOGFILES 192
              MAXLOGMEMBERS 3
              MAXDATAFILES 1024
              MAXINSTANCES 32
              MAXLOGHISTORY 292
              LOGFILE
              GROUP 1 ( '+dg_075_fra01', '+dg_305_data01' ) SIZE 100 M REUSE,
              GROUP 2 ( '+dg_075_fra01', '+dg_305_data01' ) SIZE 100 M REUSE
              DATAFILE
              '+DG_075_DATA01/ub305/datafile/system.322.790695353'
              CHARACTER SET AL32UTF8

              RMAN-00571: ===========================================================
              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
              RMAN-00571: ===========================================================
              RMAN-03002: failure of Duplicate Db command at 08/07/2012 13:37:18
              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 '+dg_305_data01'
              ORA-15001: diskgroup "DG_305_DATA01" does not exist or is not mounted
              • 4. Re: Problems doing an active Database duplication through RMAN
                Sebastian Solbach -Dba Community-Oracle
                Hi,

                well the error clearly states that he tries to create the controlfiles in the data diskgroup and in the FRA diskgroup (db_recovery_file_dest given in spfile).
                And the FRA does not seem to exists on the standby, where you want to duplicate the database to.

                Regards
                Sebastian