4 Replies Latest reply on Sep 5, 2018 1:10 PM by GTS (DBA)

    RMAN Backups are given in target server, but could not mount the database

    GTS (DBA)

      Hi all,

       

      Source DB name : orcl on  [cdc1 - server]

      'orcl' database will be cloned 'clonedb' on another server  [cdc3 - server]

       

       

      I have complete rman backup in /u02/rman_bkp location in cdc3 server.

       

      ON CDC3  SERVER

       

      [oracle@cdc3 ~]$ rman target /

       

      Recovery Manager: Release 11.2.0.1.0 - Production on Wed Sep 5 22:17:33 2018

       

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

       

      connected to target database: CLONEDB (not mounted)

       

      RMAN> restore controlfile from '/u02/rman_bkp/o1_mf_s_986070938_frzdctxb_.bkp';

       

      Starting restore at 05-SEP-18

      using target database control file instead of recovery catalog

      allocated channel: ORA_DISK_1

      channel ORA_DISK_1: SID=20 device type=DISK

       

      channel ORA_DISK_1: restoring control file

      channel ORA_DISK_1: restore complete, elapsed time: 00:00:02

      output file name=/u02/app/oracle/oradata/clonedb/control01.ctl

      output file name=/u01/app/oracle/flash_recovery_area/clonedb/control02.ctl

      Finished restore at 05-SEP-18

       

      RMAN> alter database mount;

       

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

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

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

      RMAN-03002: failure of alter db command at 09/05/2018 22:20:18

      ORA-01103: database name 'ORCL' in control file is not 'CLONEDB'

       

       

      I can understand the error.

      What are other possible ways to complete cloning process ?

        • 1. Re: RMAN Backups are given in target server, but could not mount the database
          John Thorton

          GTS (DBA) wrote:

           

          Hi all,

           

          Source DB name : orcl on [cdc1 - server]

          'orcl' database will be cloned 'clonedb' on another server [cdc3 - server]

           

           

          I have complete rman backup in /u02/rman_bkp location in cdc3 server.

           

          ON CDC3 SERVER

           

          [oracle@cdc3 ~]$ rman target /

           

          Recovery Manager: Release 11.2.0.1.0 - Production on Wed Sep 5 22:17:33 2018

           

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

           

          connected to target database: CLONEDB (not mounted)

           

          RMAN> restore controlfile from '/u02/rman_bkp/o1_mf_s_986070938_frzdctxb_.bkp';

           

          Starting restore at 05-SEP-18

          using target database control file instead of recovery catalog

          allocated channel: ORA_DISK_1

          channel ORA_DISK_1: SID=20 device type=DISK

           

          channel ORA_DISK_1: restoring control file

          channel ORA_DISK_1: restore complete, elapsed time: 00:00:02

          output file name=/u02/app/oracle/oradata/clonedb/control01.ctl

          output file name=/u01/app/oracle/flash_recovery_area/clonedb/control02.ctl

          Finished restore at 05-SEP-18

           

          RMAN> alter database mount;

           

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

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

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

          RMAN-03002: failure of alter db command at 09/05/2018 22:20:18

          ORA-01103: database name 'ORCL' in control file is not 'CLONEDB'

           

           

          I can understand the error.

          What are other possible ways to complete cloning process ?

          First restore as "orcl" then change its name.

          • 2. Re: RMAN Backups are given in target server, but could not mount the database
            GTS (DBA)

            I can understand the error.

            Suppose I do not want to restore as 'orcl' ... then i ask any other possibilities ?

             

            I tried another way ... here also getting failed

             

            [oracle@cdc3 ~]$ rman auxiliary sys/orcl@CLONEDB target sys/orcl@ORCLDB

             

            Recovery Manager: Release 11.2.0.1.0 - Production on Wed Sep 5 22:47:21 2018

             

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

             

            connected to target database: ORCL (DBID=1492020190)

            connected to auxiliary database: ORCL (not mounted)

             

            RMAN> duplicate target database to 'clonedb';

             

            Starting Duplicate Db at 05-SEP-18

            using target database control file instead of recovery catalog

            allocated channel: ORA_AUX_DISK_1

            channel ORA_AUX_DISK_1: SID=1 device type=DISK

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

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

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

            RMAN-03002: failure of Duplicate Db command at 09/05/2018 22:48:24

            RMAN-05520: database name mismatch, auxiliary instance has ORCL, command specified CLONEDB

            • 3. Re: RMAN Backups are given in target server, but could not mount the database
              John Thorton

              GTS (DBA) wrote:

               

              I can understand the error.

              Suppose I do not want to restore as 'orcl' ... then i ask any other possibilities ?

               

               

              Realize that the name of the database you backed up is "ORCL".

              RMAN knows nothing about any database named "CLONEDB".

               

              You can either accept reality or continue to obsess about the fantasy between your ears.

              1 person found this helpful
              • 4. Re: RMAN Backups are given in target server, but could not mount the database
                GTS (DBA)

                [oracle@cdc3 ~]$ rman target /

                 

                Recovery Manager: Release 11.2.0.1.0 - Production on Wed Sep 5 22:55:41 2018

                 

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

                 

                connected to target database: ORCL (not mounted)

                 

                RMAN> restore controlfile from '/u02/rman_bkp/o1_mf_s_986070938_frzdctxb_.bkp';

                 

                Starting restore at 05-SEP-18

                using target database control file instead of recovery catalog

                allocated channel: ORA_DISK_1

                channel ORA_DISK_1: SID=20 device type=DISK

                 

                channel ORA_DISK_1: restoring control file

                channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

                output file name=/u02/app/oracle/oradata/orcl/control01.ctl

                output file name=/u01/app/oracle/flash_recovery_area/orcl/control02.ctl

                Finished restore at 05-SEP-18

                 

                RMAN> sql 'alter database mount';

                 

                sql statement: alter database mount

                released channel: ORA_DISK_1

                 

                RMAN> catalog start with '/u02/rman_bkp';

                 

                Starting implicit crosscheck backup at 05-SEP-18

                allocated channel: ORA_DISK_1

                channel ORA_DISK_1: SID=20 device type=DISK

                Crosschecked 3 objects

                Finished implicit crosscheck backup at 05-SEP-18

                 

                Starting implicit crosscheck copy at 05-SEP-18

                using channel ORA_DISK_1

                Finished implicit crosscheck copy at 05-SEP-18

                 

                searching for all files in the recovery area

                cataloging files...

                cataloging done

                 

                List of Cataloged Files

                =======================

                File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2018_01_01/o1_mf_1_5_f4n7hgj6_.arc

                File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2018_01_01/o1_mf_1_3_f4lcgk0k_.arc

                File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2018_01_01/o1_mf_1_4_f4n6pcb2_.arc

                File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2018_09_05/o1_mf_1_6_frypzdkx_.arc

                 

                searching for all files that match the pattern /u02/rman_bkp

                 

                List of Files Unknown to the Database

                =====================================

                File Name: /u02/rman_bkp/o1_mf_annnn_CDC3_frzdcs7v_.bkp

                File Name: /u02/rman_bkp/o1_mf_nnndf_TAG20180905T203501_frzdbp00_.bkp

                File Name: /u02/rman_bkp/o1_mf_annnn_CDC3_frzdbnf3_.bkp

                File Name: /u02/rman_bkp/o1_mf_s_986070938_frzdctxb_.bkp

                 

                Do you really want to catalog the above files (enter YES or NO)? YES

                cataloging files...

                cataloging done

                List of Cataloged Files

                =======================

                File Name: /u02/rman_bkp/o1_mf_annnn_CDC3_frzdcs7v_.bkp

                File Name: /u02/rman_bkp/o1_mf_nnndf_TAG20180905T203501_frzdbp00_.bkp

                File Name: /u02/rman_bkp/o1_mf_annnn_CDC3_frzdbnf3_.bkp

                File Name: /u02/rman_bkp/o1_mf_s_986070938_frzdctxb_.bkp

                 

                run {

                set newname for datafile 1 to '/u02/app/oracle/oradata/orcl/system01.dbf';

                set newname for datafile 2 to '/u02/app/oracle/oradata/orcl/sysaux01.dbf';

                set newname for datafile 3 to '/u02/app/oracle/oradata/orcl/undotbs01.dbf';

                set newname for datafile 4 to '/u02/app/oracle/oradata/orcl/users01.dbf';

                set newname for tempfile 1 to '/u02/app/oracle/oradata/orcl/temp01.dbf';

                restore database;

                switch datafile all;

                }> }

                 

                executing command: SET NEWNAME

                 

                executing command: SET NEWNAME

                 

                executing command: SET NEWNAME

                 

                executing command: SET NEWNAME

                 

                executing command: SET NEWNAME

                 

                 

                Starting restore at 05-SEP-18

                using channel ORA_DISK_1

                 

                channel ORA_DISK_1: starting datafile backup set restore

                channel ORA_DISK_1: specifying datafile(s) to restore from backup set

                channel ORA_DISK_1: restoring datafile 00001 to /u02/app/oracle/oradata/orcl/system01.dbf

                channel ORA_DISK_1: restoring datafile 00002 to /u02/app/oracle/oradata/orcl/sysaux01.dbf

                channel ORA_DISK_1: restoring datafile 00003 to /u02/app/oracle/oradata/orcl/undotbs01.dbf

                channel ORA_DISK_1: restoring datafile 00004 to /u02/app/oracle/oradata/orcl/users01.dbf

                channel ORA_DISK_1: restoring datafile 00005 to /u02/app/oracle/oradata/orcl/example01.dbf

                channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/o1_mf_nnndf_TAG20180905T203501_frzdbp00_.bkp

                channel ORA_DISK_1: piece handle=/u02/rman_bkp/o1_mf_nnndf_TAG20180905T203501_frzdbp00_.bkp tag=TAG20180905T203501

                channel ORA_DISK_1: restored backup piece 1

                channel ORA_DISK_1: restore complete, elapsed time: 00:00:45

                Finished restore at 05-SEP-18

                 

                 

                RMAN> run {

                2> recover database;

                3> }

                 

                Starting recover at 05-SEP-18

                using channel ORA_DISK_1

                 

                starting media recovery

                 

                channel ORA_DISK_1: starting archived log restore to default destination

                channel ORA_DISK_1: restoring archived log

                archived log thread=1 sequence=21

                channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/o1_mf_annnn_CDC3_frzdcs7v_.bkp

                channel ORA_DISK_1: piece handle=/u02/rman_bkp/o1_mf_annnn_CDC3_frzdcs7v_.bkp tag=CDC3

                channel ORA_DISK_1: restored backup piece 1

                channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

                archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2018_09_05/o1_mf_1_21_frzo4b1v_.arc thread=1 sequence=21

                channel default: deleting archived log(s)

                archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2018_09_05/o1_mf_1_21_frzo4b1v_.arc RECID=24 STAMP=986079914

                unable to find archived log

                archived log thread=1 sequence=22

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

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

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

                RMAN-03002: failure of recover command at 09/05/2018 23:05:15

                RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 22 and starting SCN of 1160310

                 

                SQL> select OPEN_RESETLOGS from v$database;

                 

                OPEN_RESETL

                -----------

                REQUIRED

                 

                SQL> alter database open resetlogs;

                 

                Database altered.

                 

                SQL> select name, open_mode from v$database;

                 

                NAME      OPEN_MODE

                --------- --------------------

                ORCL      READ WRITE

                 

                SQL> archive log list;

                Database log mode              Archive Mode

                Automatic archival             Enabled

                Archive destination            USE_DB_RECOVERY_FILE_DEST

                Oldest online log sequence     1

                Next log sequence to archive   1

                Current log sequence           1

                 

                 

                I recovered my database. Thanks for suggestion.

                 

                I have a question here ..

                 

                 

                1) Suppose i do not want to use following scripr .. ( because for PROD database, we have 170+ datafiles )

                 

                run {

                set newname for datafile 1 to '/u02/app/oracle/oradata/orcl/system01.dbf';

                set newname for datafile 2 to '/u02/app/oracle/oradata/orcl/sysaux01.dbf';

                set newname for datafile 3 to '/u02/app/oracle/oradata/orcl/undotbs01.dbf';

                set newname for datafile 4 to '/u02/app/oracle/oradata/orcl/users01.dbf';

                }

                 

                instead of above script , can i use below parameters in pfile ?

                Will it workable ?

                log_file_name_convert

                db_name_file_convert

                 

                Thanks

                Pls update