6 Replies Latest reply: Jul 16, 2014 8:48 PM by Nip-Oracle RSS

    how to refresh sandbox environment from DEV environment

    YoungDBA

      Hello Everyone out there,

       

      I am looking for steps to refresh sandbox environment with the DEV database backup available on the EMC data Domain.

       

      Details of the environments and backups are as follows:

       

      Environment: Development

      DEV Database.

      Version: Oracle 11gr2 (11.2.0.3)

      Archivelog mode.

      Plugin for Data Domain DDBOOST installed.

      backups: RMAN (no catalog, using controlfile) FULL backup and shipping backup to EMC Data Domain and a copy to DR Domain using Media manager library.

       

       

      Environment: Sandbox

      Test Database

      Version: Oracle 11gr2 (11.2.0.3)

      Archivelog mode.

      Plugin for Data Domain DDBOOST installed.

      backups: RMAN (no catalog, using controlfile) Full backups and shipping backup to EMC Data Domain and a copy to DR Domain using Media manager library.

       

      In both environments the devices used for backup are of type 'SBT_TAPE' and configured respectively.


      The backups of DEV are available as of 07/07/2014.

       

      The pfile of the Test database has the parameters db_file_name_convert and log_file_name_convert already set.

       

      I would like to refresh Test Database with Development database backup as of 07/09/2014.

       

       

      In the past the backups were all disk based and the backups were stored according to date in EVAULT system and it was easy to refresh the Test (sandbox ) environment.

       

      Can somebody help me with the steps to be taken to refresh Test database from DEV database in the data domain scenario?

       

      Thanks a ton in advance.

       

      Ram.

        • 1. Re: how to refresh sandbox environment from DEV environment
          Nip-Oracle

          Below Article will resolve your situation :

           

          Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups (Doc ID 1375864.1)

          • 2. Re: how to refresh sandbox environment from DEV environment
            YoungDBA

            Hello NiP,

             

            Like I said before I have no catalog database.

             

            I followed the mentioned documentation and cleaned up my test environment and did the following as per the document after the cleanup:

            [oracle@test-rms-db dbs]$ rman target /
            Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jul 16 11:44:54 2014
            Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
            Connected to target database (not started)
            RMAN> exit

            Recovery Manager complete.

            [oracle@test-rms-db dbs]$ rman auxiliary /
            Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jul 16 11:45:32 2014
            Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
            connected to auxiliary database (not started)
            RMAN>  startup clone nomount;
            Oracle instance started
            Total System Global Area    2087780352 bytes
            Fixed Size                     2229944 bytes
            Variable Size               1610615112 bytes
            Database Buffers             469762048 bytes
            Redo Buffers                   5173248 bytes
            RMAN>

            So far so good.
            When I run the duplicate command the duplicate dies as I do not have a CATALOG or TARGET.  The code executed and error are as follows:

            RMAN> run {
            A2> LLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=vmc-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';
            dup3> licate database rmsdev dbid 2110562402 to rmsdbtst
              4> until scn 14741727969
            5>   db_file_name_convert '/u01/oradata/rmsdev/','/u01/app/oracle/oradata/rmsdbtst/','/u02/oradata/rmsdev/','/u02/app/oracle/oradata/rmsdbtst/','/u03/oradata/rmsdev/','/u03/app/oracle/oradata/rmsdbtst/','/u04/oradata/rmsdev/','/u04/app/oracle/oradata/rmsdbtst/'
              6> spfile
            7>   parameter_value_convert 'rmsdev','rmsdbtst'
            8>   set log_file_name_convert '/u05/oradata/rmsdev/','/u05/app/oracle/oradata/rmsdbtst/','/u06/oradata/rmsdev/','/u06/app/oracle/oradata/rmsdbtst/';
            }
            9>
            allocated channel: C1
            channel C1: SID=1137 device type=SBT_TAPE
            channel C1: Data Domain Boost API
            Starting Duplicate Db at 16-JUL-14
            released channel: C1
            RMAN-00571: ===========================================================
            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
            RMAN-00571: ===========================================================
            RMAN-03002: failure of Duplicate Db command at 07/16/2014 11:59:12
            RMAN-05501: aborting duplication of target database
            RMAN-05546: DUPLICATE without TARGET and CATALOG connections requires that BACKUP LOCATION is specified

            On the other hand If I run the below code, it works:


            RUN {
            ALLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=vmc-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';
            send 'set username ddboost_user password ddboost_passwd servername vmc-ddutility.carmart.vmc';
            RELEASE CHANNEL C1;
            }

            RMAN> RUN {
            AL2> LOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=vmc-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';
            send3>  'set username ddboost_user password ddboost_passwd servername vmc-ddutility.carmart.vmc';
            R4> ELEASE CHANNEL C1;
            }
            5>
            allocated channel: C1
            channel C1: SID=1137 device type=SBT_TAPE
            channel C1: Data Domain Boost API
            sent command to channel: C1

            released channel: C1

            RMAN>

             

            The backups are there on the Data Domain vmc-ddutility.carmart.vmc  from DEV:

             

            Can you help me in providing pointers?

             

            Thanks,
            Ram.

            • 3. Re: how to refresh sandbox environment from DEV environment
              YoungDBA

              Hello NiP-Oracle,

               

              I found the location and gave the parameter backup location in my script.  I get the following error:

               

              run {

              ALLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=dr-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';

              duplicate database rmsdev dbid 2110562402 to rmsdbtst

                until time 'SYSDATE-1'

                db_file_name_convert '/u01/oradata/rmsdev/','/u01/app/oracle/oradata/rmsdbtst/','/u02/oradata/rmsdev/','/u02/app/oracle/oradata/rmsdbtst/','/u03/oradata/rmsdev/','/u03/app/oracle/oradata/rmsdbtst/','/u04/oradata/rmsdev/','/u04/app/oracle/oradata/rmsdbtst/'

                spfile

                parameter_value_convert 'rmsdev','rmsdbtst'

                set log_file_name_convert '/u05/oradata/rmsdev/','/u05/app/oracle/oradata/rmsdbtst/','/u06/oradata/rmsdev/','/u06/app/oracle/oradata/rmsdbtst/'

                  backup location '/data/col1/Oracle';

              }

               

               

              allocated channel: C1
              channel C1: SID=1137 device type=SBT_TAPE
              channel C1: Data Domain Boost API

              Starting Duplicate Db at 16-JUL-14
              released channel: C1
              RMAN-00571: ===========================================================
              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
              RMAN-00571: ===========================================================
              RMAN-03002: failure of Duplicate Db command at 07/16/2014 13:38:00
              RMAN-05501: aborting duplication of target database
              RMAN-05562: SPFILE backup not found for database RMSDEV with DBID 2110562402 created before SYSDATE-1 in /data/col1/Oracle

              RMAN>

               

               

              When I check on the list backup command I see spfile has been backed up.

               

               

              BS Key  Type LV Size
              ------- ---- -- ----------
              453     Full    1.00M
                SPFILE Included: Modification time: 13-JUL-14
                SPFILE db_unique_name: RMSDEV

                Backup Set Copy #1 of backup set 453
                Device Type Elapsed Time Completion Time Compressed Tag
                ----------- ------------ --------------- ---------- ---
                SBT_TAPE    00:00:03     15-JUL-14       NO         TAG20140715T135325

                  List of Backup Pieces for backup set 453 Copy #1
                  BP Key  Pc# Status      Media                   Piece Name
                  ------- --- ----------- ----------------------- ----------
                  595     1   AVAILABLE   Oracle                  j0pdfacu_1_1

                Backup Set Copy #2 of backup set 453
                Device Type Elapsed Time Completion Time Compressed Tag
                ----------- ------------ --------------- ---------- ---
                SBT_TAPE    00:00:03     15-JUL-14       NO         TAG20140715T135325

                  List of Backup Pieces for backup set 453 Copy #2
                  BP Key  Pc# Status      Media                   Piece Name
                  ------- --- ----------- ----------------------- ----------
                  596     1   AVAILABLE   Oracle                  j0pdfacu_1_2

               

              Can you please provide pointers to get the duplicate running?

               

              Thanks,
              Ram.

              • 4. Re: how to refresh sandbox environment from DEV environment
                894330

                Please run the following

                 

                1. As you have already have db_file_name_convert and log_file_name_convert parameters set in your sandbox database pfile, startup nomount it using that pfile

                2. make sure your data domain is accessible by sandbox server

                3. do you have SCN or sequence number that you can use in duplicate command. you can run below

                list backup and get the sequence#

                 

                connect target sys/password@DEV

                connect auxiliary /

                run

                {

                /* your allocate goes here */

                ALLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=dr-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';

                duplicate target database to test until sequence ${SEQUENCE};

                }

                • 5. Re: how to refresh sandbox environment from DEV environment
                  YoungDBA

                  Hello,

                   

                  I have tried your suggestion and here are the errors I get:

                   

                  RMAN> run {
                  A2> LLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=vmc-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';
                  dupl3> icate database rmsdev to rmsdbtst until sequence 14741727969;
                  }
                  4>
                  allocated channel: C1
                  channel C1: SID=1137 device type=SBT_TAPE
                  channel C1: Data Domain Boost API

                  Starting Duplicate Db at 16-JUL-14
                  released channel: C1
                  RMAN-00571: ===========================================================
                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                  RMAN-00571: ===========================================================
                  RMAN-03002: failure of Duplicate Db command at 07/16/2014 15:28:03
                  RMAN-05501: aborting duplication of target database
                  RMAN-05546: DUPLICATE without TARGET and CATALOG connections requires that BACKUP LOCATION is specified

                   

                   

                   

                  Since that yelled for backup location I gave the backup location and ran the below:

                   

                  run {
                  ALLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=vmc-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';
                  duplicate database rmsdev to rmsdbtst until sequence 14741727969
                  backup location '/data/col1/Oracle';
                  }

                  allocated channel: C1
                  channel C1: SID=1137 device type=SBT_TAPE
                  channel C1: Data Domain Boost API

                  Starting Duplicate Db at 16-JUL-14
                  released channel: C1
                  RMAN-00571: ===========================================================
                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                  RMAN-00571: ===========================================================
                  RMAN-03002: failure of Duplicate Db command at 07/16/2014 15:32:58
                  RMAN-05501: aborting duplication of target database
                  RMAN-05542: Only UNTIL TIME can be used with DUPLICATE without TARGET and CATALOG connections

                   

                   

                   

                  Since the above yelled for using UNTIL TIME I gave and ran the below:

                   

                  run {
                  ALLOCATE auxiliary CHANNEL C1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u07/oracle/ora11g/11.2.0.3/db_1/lib/libddobk.so, ENV=(STORAGE_UNIT=Oracle, BACKUP_HOST=vmc-ddutility.carmart.vmc, ORACLE_HOME=/u07/oracle/ora11g/11.2.0.3/db_1)';
                  duplicate target database to rmsdbtst until time 'sysdate -1'
                  backup location '/data/col1/Oracle';
                  }

                  allocated channel: C1
                  channel C1: SID=1137 device type=SBT_TAPE
                  channel C1: Data Domain Boost API

                  Starting Duplicate Db at 16-JUL-14
                  released channel: C1
                  RMAN-00571: ===========================================================
                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                  RMAN-00571: ===========================================================
                  RMAN-03002: failure of Duplicate Db command at 07/16/2014 15:44:48
                  RMAN-05501: aborting duplication of target database
                  RMAN-05574: CONTROLFILE backup not found for database RMSDEV created before sysdate -1 in /data/col1/Oracle

                  RMAN>
                  RMAN>

                   

                   

                  I am positive the controlfile backup is there according to the list backup command.

                   

                  I am lost.  I have tried all possible combinations.

                   

                  Thanks,
                  Ram.

                  • 6. Re: how to refresh sandbox environment from DEV environment
                    Nip-Oracle

                    If you do NOT want to connect to source database for DUPLICATE and you are not using recovery catalog, DUPLICATE is not an option for tape backups.

                     

                    If you know the controlfile backup piece handle name, you can perform manual restore/recovery. Review below Doc :

                     

                    How to Move/Restore DB to New Host and File System using RMAN (Doc ID 1338193.1)



                    Instead of Disk, you just need to allocate tape channels.