We're here to help!

Create a second standby database from the first standby’s backup

Follow
Description

The Article explains how to create a second standby from the backup of the first standby database. The example is for Version 7.0

  • Primary server has an existing database. Create a new one if necessary.
  • Dbvisit software version 7.0.40 and above is installed on both primary and standby servers.
Solution

PART I:

Create the first standby database using the transportable media option (via the Command Line Interface).

  1. On the primary server, run dbvisit setup:
    > oracle@dbvlab101[/home/oracle]: cd /usr/dbvisit/standby
    oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit\_setup
    > ------------------------------------------------------------------------------
    > =>Creating Standby Database.
    > Primary database will NOT be shutdown.
    > Choose database:
    > The following Oracle database(s) have a Dbvisit Database configuration (DDC) file on this server:
    >      DDC
    >      ===
    > 1)   DEV
    > 2)   DEVDR2
    > 3)   testdb6
    > 4)   testdb7
    > 5)   Return to menu
    > Please enter choice : 3
    > Is this correct? <Yes/No> [Yes]:
    > Database testdb6 is up.
    > >>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
    >     dbvlab102...
    > Waiting for 5 seconds (RETRIES\_WAIT\_IN\_SEC) until retry.
    >     Dbvisit Standby configurational differences found between dbvlab101 and dbvlab102...
    >   > Transferring 'dbv\_testdb6.env' to server dbvlab102:7890
    >     Progress: 0%...20%...40%...60%...80%...100% [4402 KB/s] - done.
    > >>> Checking Oracle installation on dbvlab102 in
    >     /u01/app/oracle/product/11.2.0/db\_1/bin/oracle...
    > >>> Checking primary datafiles on dbvlab101...
    > >>> Validating Dbvisit configuration file on dbvlab102...
    > >>> Checking if a database is up and running on dbvlab102...
    >     Checks completed OK.
    > >>> Total database size for testdb6 is 1.24GB
    > What would you like to do:
    >    1 - Create standby database (and optionally save settings in template)
    >    2 - Help
    >    3 - Terminate processing
    >    Please enter your choice [1]: 1
    > -------------------------------------------------------------------------------
    > Do you want to create an ASM standby database (with all or some database files in ASM storage)? [No]:
    > Standby database will be ASM: N
    > Is this correct? <Yes/No> [Yes]:
    > -------------------------------------------------------------------------------
    > Answer Yes to transfer the datafiles directly to the standby server (not recommended for large database or slow networks)
    > Note tablespaces will be placed in backup mode for direct copy.
    > Answer No (recommended) to create an RMAN backup of primary datafiles in a temporary location and transfer the backup to the standby server
    > Do you want to copy database files directly to the standby server? [No]:
    > Database files will be copied to standby server using temporary location on dbvlab101.
    > Is this correct? <Yes/No> [Yes]:
    > -------------------------------------------------------------------------------
    > Use network compression to compress the database files during transfer? [No]:
    > Database files will be compressed during transfer: N
    > Is this correct? <Yes/No> [Yes]:
    > -------------------------------------------------------------------------------
    > Dbvisit Standby provides functionality to create missing filesystem directories on the standby server automatically.
    > Do you want Dbvisit Standby to create missing filesystem directories on the standby server automatically? [Yes]:
    > Dbvisit Standby will create missing filesystem directories automatically: Y
    > Is this correct? <Yes/No> [Yes]:
    > -------------------------------------------------------------------------------
    > The following oracle database parameters will be set in the standby database pfile or spfile:
    > -------------------------------------------------------------------------------
    > audit\_file\_dest                         /u01/app/oracle/admin/testdb6/adump
    > compatible                              11.2.0.4.0
    > control\_files                           /u01/app/oracle/oradata/testdb6/control01.ctl, /u01/app/oracle/fast\_recovery\_area/testdb6/control02.ctl
    > db\_block\_size                           8192
    > db\_name                                 testdb6
    > db\_recovery\_file\_dest                   /u01/app/oracle/fast\_recovery\_area
    > db\_recovery\_file\_dest\_size              8589934592
    > diagnostic\_dest                         /u01/app/oracle
    > dispatchers                             (PROTOCOL=TCP) (SERVICE=testdb6XDB)
    > log\_archive\_format                      %t\_%s\_%r.dbf
    > nls\_territory                           NEW ZEALAND
        open\_cursors                            300
    > pga\_aggregate\_target                    182452224
    > processes                               150
    > remote\_login\_passwordfile               EXCLUSIVE
    > sga\_target                              549453824
    > spfile                                  OS default
    > undo\_tablespace                         UNDOTBS1
    > -------------------------------------------------------------------------------
    > What would you like to do:
    >    1 - Proceed with creating the standby database
    >    2 - Edit oracle database parameters for the standby database pfile/spfile
    >    3 - Terminate processing
    >    Please enter your choice [1]:
    > Validating oracle database parameters... please wait
    > SUCCEEDED
    > -------------------------------------------------------------------------------
    > Do you want to use TRANSPORTABLE MEDIA to transfer the database backup to the standby server? Transportable media is an external device such as a USB drive that is first plugged into the primary server
    > and then manually transferred to the standby site and plugged into the standby server to continue the process. It can be used for large databases or slow networks.
    > Specifying No means the network will be used to transfer the database backup. [No]: Yes
    > Transportable media will be used: Y
    > Is this correct? <Yes/No> [Yes]:
    > -------------------------------------------------------------------------------
    > A transportable media location must be specified on dbvlab101 where the database will be backed up to first.
    > This location must be big enough to hold RMAN backup of the whole database (1.24GB).
    >
    > Specify the location on this server: [/usr/tmp]: /home/oracle/backup/testdb6
    > Directory for transportable media location will be: /home/oracle/backup/testdb6
    > Is this correct? <Yes/No> [Yes]:
    > -------------------------------------------------------------------------------
    > Please specify the transportable media location on dbvlab102. This is where the backup of the database will be found after plugging the transportable media into the remote server.
    >
    > Specify location on remote server: [/home/oracle/backup/testdb6]:
    > Directory for transportable media will be: /home/oracle/backup/testdb6
    > Is this correct? <Yes/No> [Yes]:
    >
    > Primary database contains non-OMF datafiles and/or tempfiles.
    > Creation of non-OMF standby datafiles and/or tempfiles requires valid filesystem locations on the standby server.
    > Review and confirm standby locations to create standby non-OMF datafiles and tempfiles.
    > -------------------------------------------------------------------------------
    > Primary                         ===> Standby
    > -------------------------------------------------------------------------------
    > /u01/app/oracle/oradata/testdb6 ===> /u01/app/oracle/oradata/testdb6
    > -------------------------------------------------------------------------------
    > What would you like to do:
    >    1 - Confirm standby location(s) are correct and continue
    >    2 - Provide different standby location(s)
    >    Please enter your choice [1]: 1
    > Standby locations validated.
    >
    > Primary database contains non-OMF redo logs.
    > Creation of non-OMF redo logs Dbvisit Standby requires valid filesystem locations on the standby server.
    > Review and confirm standby locations to create standby non-OMF redo logs.
    > -------------------------------------------------------------------------------
    > Primary                         ===> Standby
    > -------------------------------------------------------------------------------
    > /u01/app/oracle/oradata/testdb6 ===> /u01/app/oracle/oradata/testdb6
    > -------------------------------------------------------------------------------
    > What would you like to do:
    >    1 - Confirm standby location(s) are correct and continue
    >    2 - Provide different standby location(s)
    >    Please enter your choice [1]: 1
    > Standby locations validated.
    > -------------------------------------------------------------------------------
    > =>Create standby database template for testdb6 using provided answers? <Yes/No> [Yes]:
    > What would you like to do:
    >    1 - Continue with creating a standby database
    >    2 - Terminate creating a standby database. The saved template will be
    >        available for future use
    >    Please enter your choice [1]:
    >
    > >>> Dbvisit will now run a pre-flight check for standby database creation. An attempt will
    >     be made to create a standby (s)pfile using oracle standby database parameters, followed
    >     by trying to start the standby instance. If this step fails, then please double-check
    >     the following items before re-running Dbvisit again:
    >
    >     1) Review the standby database parameters you have supplied and provide valid values
    >     unless a template is used.
    >     2) Recreate the template to provide valid values for standby database parameters if a
    >     template is used.
    >
    >     Running pre-flight check for standby creation, please wait... - done.
    >
    > >>> Backing up primary database...
    >
    >     Backing up datafile 1... - done.
    >     Backing up datafile 2... - done.
    >     Backing up datafile 3... - done.
    >     Backing up datafile 4... - done.
    > |
    > >>> Creating standby control file... - done.
    >
    > Backup of primary database completed.
    >
    > Requested stop point has been reached. Database has been backed up to /home/oracle/backup/testdb6.
    > Please complete the folllowing steps:
    > 1 - Unplug Transportable Media (/home/oracle/backup/testdb6) from this server (dbvlab101).
    > 2 - Manually move Transportable Media to standby server (dbvlab102).
    > 3 - Plug in Transportable Media to standby server (dbvlab102).
    > 4 - Ensure Transportable Media can be found in /home/oracle/backup/testdb6 (on dbvlab102).
    > 5 - Restart the process on this server (dbvlab101).
  2. Using SCP command, copy the backup from primary server to standby server and quickly check that the backup files are copied:
    • On the Primary Server:
      > oracle@dbvlab101[/home/oracle/backup/testdb6]: scp \*.\*  oracle@dbvlab102:/home/oracle/backup/testdb6/
      > dbv\_testdb6\_csd\_dbf\_1\_01qakjeq\_1\_1.rman                           100%  192MB  16.0MB/s   00:12
      > dbv\_testdb6\_csd\_dbf\_1\_02qakjgh\_1\_1.rman                         100% 1072KB   1.1MB/s   00:00
      > dbv\_testdb6\_csd\_dbf\_2\_03qakjgn\_1\_1.rman                           100%   69MB  23.0MB/s   00:03
      > dbv\_testdb6\_csd\_dbf\_3\_04qakjhm\_1\_1.rman                           100% 4416KB   4.3MB/s   00:00
      > dbv\_testdb6\_csd\_dbf\_4\_05qakji0\_1\_1.rman                           100% 1080KB   1.1MB/s   00:00
      > dbv\_testdb6\_csd\_stdby.ctl
    • On the Standby Server:
      > [oracle@dbvlab102 standby]$ cd /home/oracle/backup/testdb6/
      > [oracle@dbvlab102 testdb6]$ ls -lrt
      > total 283664
      > -rw-r----- 1 oracle oinstall 201654272 Jun 28 13:59 dbv\_testdb6\_csd\_dbf\_1\_01qakjeq\_1\_1.rman
      > -rw-r----- 1 oracle oinstall   1097728 Jun 28 13:59 dbv\_testdb6\_csd\_dbf\_1\_02qakjgh\_1\_1.rman
      > -rw-r----- 1 oracle oinstall  72294400 Jun 28 13:59 dbv\_testdb6\_csd\_dbf\_2\_03qakjgn\_1\_1.rman
      > -rw-r----- 1 oracle oinstall   4521984 Jun 28 13:59 dbv\_testdb6\_csd\_dbf\_3\_04qakjhm\_1\_1.rman
      > -rw-r----- 1 oracle oinstall   1105920 Jun 28 13:59 dbv\_testdb6\_csd\_dbf\_4\_05qakji0\_1\_1.rman
      > -rw-r----- 1 oracle oinstall   9797632 Jun 28 13:59 dbv\_testdb6\_csd\_stdby.ctl
  3. Resume the creation of standby database.

    Note: please make sure to select “Restart the uncompleted creation of standby database” option after choosing a database name.

    > To resume the creation of the standby database choose Restart under the Create Standby Database option.
    > Dbvisit Standby will provide the option to re-start this process from the stop point.
    > Please press <Enter> to continue...
    > =========================================================
    >      Dbvisit Standby Database Technology (7.0.40.14168)
    >            http://www.dbvisit.com
    >      Dbvisit Database setup
    >        Default values will be shown in []
    >   Options:
    >        1) New Dbvisit Database setup (combines options 2,3,4)
    >        1a) New Dbvisit RAC Instance setup (combines options 2,3,4)
    >
    >        2) New Dbvisit Database configuration (DDC) file setup
    >        3) New Dbvisit Archive Management Module (AMM) setup
    >        4) New Dbvisit Database repository (DDR) setup
    >
    >        5) Manage Dbvisit Database repository (DDR)
    >        6) Update Dbvisit Database configuration (DDC) file
    >
    >        7) Create Standby Database (and template)
    >        8) Synchronize Standby Database
    >
    >        9) Uninstall Dbvisit Database repository (DDR)
    >        E) Exit
    > =========================================================
    > Please enter choice : 7
    > ------------------------------------------------------------------------------
    > =>Creating Standby Database.
    > Primary database will NOT be shutdown.
    >
    > Choose database:
    > The following Oracle database(s) have a Dbvisit Database configuration (DDC) file on this server:
    >      DDC
    >      ===
    > 1)   DEV
    > 2)   DEVDR2
    > 3)   testdb6
    > 4)   testdb7
    > 5)   Return to menu
    >
    > Please enter choice : 3
    >
    > Is this correct? <Yes/No> [Yes]:
    > Database testdb6 is up.
    > >>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
    >     dbvlab102...
    >     No configurational differences found between dbvlab101 and dbvlab102.
    > >>> Checking Oracle installation on dbvlab102 in
    >     /u01/app/oracle/product/11.2.0/db\_1/bin/oracle...
    > >>> Checking primary datafiles on dbvlab101...
    > >>> Validating Dbvisit configuration file on dbvlab102...
    > >>> Checking if a database is up and running on dbvlab102...
    >     Checks completed OK.
    > >>> Total database size for testdb6 is 1.24GB
    >
    > What would you like to do:
    >    1 - Create standby database (and optionally save settings in template)
    >    2 - Restart the uncompleted creation of standby database
    >    3 - Create standby database using existing template (previously saved)
    >    4 - Help
    >    5 - Terminate processing
    >    Please enter your choice [2]: 2
    > What would you like to do:
    >    1 - Restart the uncompleted creation of standby database
    >    2 - View status of the uncompleted creation of standby database
    >    3 - Return to the previous menu
    >    Please enter your choice [1]:
    >
    > >>> Creating standby database parameter file... - done.
    > >>> Restoring standby control files... - done.
    > >>> Starting standby database testdb6 on dbvlab102 mount... - done.
    > >>> Restoring datafiles on dbvlab102...
    >
    >     Restoring datafile 1 - done.
    >     Restoring datafile 2 - done.
    >     Restoring datafile 3 - done.
    >     Restoring datafile 4 - done.
    > |
    > >>> Renaming standby redo logs and tempfiles on dbvlab102... - done.
    > >>> Performing checkpoint and archiving logs... - done.
    > >>> Finishing standby database creation... - done.
    >
    > Standby database created.
    >
    > To complete creating standby database please run Dbvisit on the primary server first,
    > then on the standby server, to ensure the standby database is in sync with the primary
    > database.
    > Please press <Enter> to continue...
    > =========================================================
    >      Standby Database creation on dbvlab102 completed.
    >
    > Next steps:
    > 1) Exit out of dbvisit\_setup.
    > 2) Run Dbvisit on this server with command:
    >         dbvisit testdb6
    > 3) Run Dbvisit on standby server with command:
    >        dbvisit testdb6
    >
    > Once Dbvisit has been tested, schedule Dbvisit on primary and standby servers using cron or other scheduling tool.
    > =========================================================
    > Please press <Enter> to continue...
    > =========================================================
    >      Dbvisit Standby Database Technology (7.0.40.14168)
    >            http://www.dbvisit.com
    >      Dbvisit Database setup
    >        Default values will be shown in []
    >
    >   Options:
    >        1) New Dbvisit Database setup (combines options 2,3,4)
    >        1a) New Dbvisit RAC Instance setup (combines options 2,3,4)
    >
    >        2) New Dbvisit Database configuration (DDC) file setup
    >        3) New Dbvisit Archive Management Module (AMM) setup
    >        4) New Dbvisit Database repository (DDR) setup
    >
    >        5) Manage Dbvisit Database repository (DDR)
    >        6) Update Dbvisit Database configuration (DDC) file
    >
    >        7) Create Standby Database (and template)
    >        8) Synchronize Standby Database
    >
    >        9) Uninstall Dbvisit Database repository (DDR)
    >        E) Exit
    >
    > =========================================================
    > Please enter choice : e
    > =========================================================
    >      Dbvisit setup completed.
    >
    >  Any changes to the configuration can be made by either:
    > 1) Manually by editing dbv\_testdb6.env.
    > 2) Running dbvisit\_setup and choosing option:
    >      -> 6) Update Dbvisit Database configuration (DDC) file
    >
    > Next steps:
    > 1) Run Dbvisit on this server with command:
    >        dbvisit testdb6
    > 2) Run Dbvisit on standby server with command:
    >        dbvisit testdb6
    >
    > Once Dbvisit has been tested, schedule Dbvisit on primary and standby servers using cron or other scheduling tool.
    > =========================================================
  4. Register Dbvisit software on the primary server.
    > oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit -lic testdb6 XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
    > =============================================================
    > Dbvisit Standby Database Technology (7.0.40.14168) (pid 7598)
    > dbvisit started on dbvlab101: Sun Jun 28 14:28:36 2015 ()
    > =============================================================
    >
    > Dbvisit Standby license information for: testdb6
    > customer\_seq=1
    > customer\_key\_seq=0
    > license\_type=DEMO (0)
    > expiry\_date=2015-07-24
    > =>Update with license key: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX? <Yes/No> [Yes]:
    > License updated.
    > Status: Valid
    >
    > =============================================================
    > dbvisit ended on dbvlab101: Sun Jun 28 14:28:38 2015
    > =============================================================
  5. Perform ship and apply of archive logs. On both primary and standby servers, execute:
    ./dbvisit <DDC>
    • On the Primary Server:
      >  oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit testdb6
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 7623)
      > dbvisit started on dbvlab101: Sun Jun 28 14:28:43 2015 ()
      > =============================================================
      >
      > >>> Obtaining information from standby database (RUN\_INSPECT=Y)...
      > >>> Note FORCE\_LOGGING is disabled in the primary database.
      > >>> Sending heartbeat message... - done.
      > >>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
      >     dbvlab102...
      >
      >     No configurational differences found between dbvlab101 and dbvlab102.
      >
      > >>> Log file(s) for testdb6 will be transferred from dbvlab101 to dbvlab102...
      >
      >   > Transferring 'o1\_mf\_1\_3\_bryos614\_.arc.gz' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [41546 KB/s] - done.
      >
      >     1 archive log transfer to dbvlab102 for testdb6 completed.
      >     Last sequence was 3.
      >     No Mail sent as SEND\_MAIL\_FLAG = N
      >
      > >>> Dbvisit Archive Management Module (AMM)
      >
      >     Config: number of archives to keep      = 0
      >     Config: number of days to keep archives = 7
      >     Config: archive backup count            = 0
      >     Config: diskspace full threshold        = 80%
      >
      >     Current disk percent full (/u01/app/oracle/fast\_recovery\_area) = 35%
      
      >     Number of archive logs deleted = 0
      
      > =============================================================
      
      > dbvisit ended on dbvlab101: Sun Jun 28 14:29:02 2015
      
      > =============================================================
    • On the Standby Server:
      > [oracle@dbvlab102 standby]$ ./dbvisit testdb6
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 8392)
      > dbvisit started on dbvlab102: Sun Jun 28 14:33:36 2015 ()
      > =============================================================
      >
      > >>> Sending heartbeat message... - done.
      > >>> Log file(s) for testdb6 from dbvlab101 will be applied to dbvlab102
      > 201506281433 - Log seq 3 thread 1 applied to standby database testdb6.
      >     No Mail sent as SEND\_MAIL\_FLAG\_DR = N
      >
      > >>> Dbvisit Archive Management Module (AMM)
      >
      >     Config: number of archives to keep      = 0
      >     Config: number of days to keep archives = 7
      >     Config: diskspace full threshold        = 80%
      >
      > Processing /home/oracle/dbvisit\_archdest/testdb6...
      >     Archive log dir: /home/oracle/dbvisit\_archdest/testdb6
      >     Total number of archive files   : 1
      >     Number of archive logs deleted = 0
      >     Current Disk percent full       : 46%
      >
      > =============================================================
      > dbvisit ended on dbvlab102: Sun Jun 28 14:33:42 2015
      
      > =============================================================
    • On the Primary Server, run the Log Gap Report. Make sure the log gap values are 0. Otherwise, perform ship and apply again.
      > oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit -i testdb6
          > =============================================================
          > Dbvisit Standby Database Technology (7.0.40.14168) (pid 7846)
          > dbvisit started on dbvlab101: Sun Jun 28 14:36:19 2015 ()
          > =============================================================
          >
          > Dbvisit Standby log gap report for testdb6 at 201506281436:
          > -------------------------------------------------------------
          > Standby database on dbvlab102 is at sequence: 3.
          > Primary database on dbvlab101 is at log sequence: 4.
          > Primary database on dbvlab101 is at archived log sequence: 3.
          > Dbvisit Standby last transfer log sequence: 3.
          > Dbvisit Standby last transfer at: 201506281428.
          >
          > Archive log gap for testdb6:  0.
          > Transfer log gap for testdb6: 0.
          > Standby database time lag (HH:MI:SS): 00:27:42.
          >     No Mail sent as SEND\_MAIL\_FLAG = N
          >
          > =============================================================
          > dbvisit ended on dbvlab101: Sun Jun 28 14:36:23 2015
          > =============================================================

PART II:

Manually create the second standby database using the first standby’s backup.

  1. Create a password file. Simply copy the password file of standby #1 and give it a new filename:
    oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]: cp orapwtestdb6 orapwtestdb6dr
  2. Create a parameter file.
    • Copy the existing spfile of standby #1 and give it a new filename:
      init<database\_name>.ora 
      oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]: cp spfiletestdb6.ora inittestdb6dr.ora
    • Using vi editor, edit the file to remove unecessary lines. Make sure db\_name is the same as the primary’s and the value of db\_unique\_name is different.

      Note: In this scenario, standby #1 and standby #2 reside on the same standby server (dbvlab102). This step is done to differentiate standby #2 from standby #1.

      > oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]: more inittestdb6dr.ora
      > audit\_file\_dest='/u01/app/oracle/admin/testdb6dr/adump'
      > compatible='11.2.0.4.0'
      > control\_files='/u01/app/oracle/oradata/testdb6dr/control01.ctl','/u01/app/oracle/fast\_recovery\_area/testdb6dr/control02.ctl' #Restore Controlfile
      > db\_block\_size=8192
      > db\_name='testdb6'
      > db\_unique\_name='testdbdr'
      > db\_recovery\_file\_dest='/u01/app/oracle/fast\_recovery\_area'
      > db\_recovery\_file\_dest\_size=8589934592
      > diagnostic\_dest='/u01/app/oracle'
      > dispatchers='(PROTOCOL=TCP) (SERVICE=testdb6XDB)'
      > log\_archive\_format='%t\_%s\_%r.dbf'
      > nls\_territory='NEW ZEALAND'
      > open\_cursors=300
      > pga\_aggregate\_target=182452224
      > processes=150
      > remote\_login\_passwordfile='EXCLUSIVE'
      > sga\_target=549453824
      > undo\_tablespace='UNDOTBS1'
      
  3. Create the following folders on the standby server.
    > oracle@dbvlab102[/u01/app/oracle]: mkdir -p /u01/app/oracle/admin/testdb6dr/adump
    > oracle@dbvlab102[/u01/app/oracle]: mkdir -p /u01/app/oracle/fast\_recovery\_area/testdb6dr/
    > oracle@dbvlab102[/u01/app/oracle]: mkdir -p /u01/app/oracle/oradata/testdb6dr/
  4. Create a spfile for standby #2.
    • On the Standby Server:
      > oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]: . oraenv
      > ORACLE\_SID = [testdb6] ? testdb6dr
      > ORACLE\_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0/db\_1
      > The Oracle base remains unchanged with value /u01/app/oracle
      > oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]:
      > oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]:
      > oracle@dbvlab102[/u01/app/oracle/product/11.2.0/db\_1/dbs]: sqlplus '/as sysdba'
      >
      > SQL\*Plus: Release 11.2.0.4.0 Production on Sun Jun 28 14:59:35 2015
      >
      > Copyright (c) 1982, 2013, Oracle.  All rights reserved.
      >
      > Connected to an idle instance.
      >
      > SQL> create spfile='/u01/app/oracle/product/11.2.0/db\_1/dbs/spfiletestdb6dr.ora' from pfile;
      >
      > File created.
  5. Restore the database. There are two ways to choose from, either:
    • A: Set the standby database filename parameters then restore.

    or

    • B: Restore using SET NEWNAME.

    OPTION (A)

    Set standby database filename parameters then restore.

    • Start the instance at nomount state and set the two parameters db\_file\_name\_convert and log\_file\_name\_convert. Note: When setting the value of the parameters, the first string is the pattern of the primary database filename while the second string is the pattern of the standby database filename.
      > SQL> startup nomount;
      > ORACLE instance started.
      >
      > Total System Global Area  546992128 bytes
      > Fixed Size             2255072 bytes
      > Variable Size               213911328 bytes
      > Database Buffers     327155712 bytes
      > Redo Buffers                  3670016 bytes
      > SQL> sho parameter spfile;
      >
      > NAME                                  TYPE     VALUE
      > ------------------------------------ ----------- ------------------------------
      > spfile                                string   /u01/app/oracle/product/11.2.0/db\_1/dbs/spfiletestdb6dr.ora
      >
      > SQL> alter system set db\_file\_name\_convert='/u01/app/oracle/oradata/testdb6', '/u01/app/oracle/oradata/testdb6dr' scope=spfile;
      >
      > System altered.
      >
      > SQL> alter system set log\_file\_name\_convert='/u01/app/oracle/oradata/testdb6', '/u01/app/oracle/oradata/testdb6dr' scope=spfile;
      >
      > System altered.
      >
      > SQL> sho parameter convert
      >
      > NAME                                  TYPE     VALUE
      > ------------------------------------ ----------- ------------------------------
      > db\_file\_name\_convert                  string
      > log\_file\_name\_convert                 string
      > SQL> sho parameter standby\_file\_management
      >
      > NAME                                  TYPE     VALUE
      > ------------------------------------ ----------- ------------------------------
      > standby\_file\_management        string   MANUAL
      > SQL> shutdown immediate;
      >
      > ORA-01507: database not mounted
      >
      > ORACLE instance shut down.
      > SQL> startup nomount;
      > ORACLE instance started.
      >
      > Total System Global Area  546992128 bytes
      > Fixed Size             2255072 bytes
      > Variable Size               213911328 bytes
      > Database Buffers     327155712 bytes
      > Redo Buffers                  3670016 bytes
      > SQL> sho parameter convert
      >
      > NAME                                  TYPE     VALUE
      > ------------------------------------ ----------- ------------------------------
      > db\_file\_name\_convert                  string   /u01/app/oracle/oradata/testdb6, /u01/app/oracle/oradata/testdb6dr
      > log\_file\_name\_convert                 string   /u01/app/oracle/oradata/testdb6, /u01/app/oracle/oradata/testdb6dr
    • Connect to RMAN. Restore the standby control file and datafiles.
      > [oracle@dbvlab102 standby]$ rman target /
      > Recovery Manager: Release 11.2.0.4.0 - Production on Sun Jun 28 13:16:49 2015
      > Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
      > connected to target database: DEV (DBID=3961402113, not open)
      >
      > RMAN> restore standby controlfile from '/home/oracle/backup/testdb6/dbv\_testdb6\_csd\_stdby.ctl';
      >
      > Starting restore at 28/06/2015:15:20:35
      > using channel ORA\_DISK\_1
      >
      > channel ORA\_DISK\_1: restoring control file
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:01
      > output file name=/u01/app/oracle/oradata/testdb6dr/control01.ctl
      > output file name=/u01/app/oracle/fast\_recovery\_area/testdb6dr/control02.ctl
      > Finished restore at 28/06/2015:15:20:36
      >
      > RMAN> alter database mount;
      >
      > database mounted
      > released channel: ORA\_DISK\_1
      >
      > RMAN> list backup;
      >
      > List of Backup Sets
      > ===================
      >
      > BS Key  Type LV Size       Device Type Elapsed Time Completion Time
      > ------- ---- -- ---------- ----------- ------------ -------------------
      > 1       Full    192.30M    DISK        00:00:52     28/06/2015:13:52:14
      >         BP Key: 1   Status: AVAILABLE  Compressed: YES  Tag: DBV\_TESTDB6\_CSD
      >         Piece Name: /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_1\_01qakjeq\_1\_1.rman
      >   List of Datafiles in backup set 1
      >   File LV Type Ckp SCN    Ckp Time            Name
      >   ---- -- ---- ---------- ------------------- ----
      >   1       Full 960514     28/06/2015:13:51:22 /u01/app/oracle/oradata/testdb6dr/system01.dbf
      >
      > BS Key  Type LV Size       Device Type Elapsed Time Completion Time
      > ------- ---- -- ---------- ----------- ------------ -------------------
      > 2       Full    1.03M      DISK        00:00:02     28/06/2015:13:52:19
      >         BP Key: 2   Status: AVAILABLE  Compressed: YES  Tag: DBV\_TESTDB6\_CSD
      >         Piece Name: /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_1\_02qakjgh\_1\_1.rman
      >   SPFILE Included: Modification time: 28/06/2015:13:44:32
      >   SPFILE db\_unique\_name: TESTDB6
      >   Control File Included: Ckp SCN: 960532       Ckp time: 28/06/2015:13:52:17
      >
      > BS Key  Type LV Size       Device Type Elapsed Time Completion Time
      > ------- ---- -- ---------- ----------- ------------ -------------------
      > 3       Full    68.94M     DISK        00:00:23     28/06/2015:13:52:46
      >         BP Key: 3   Status: AVAILABLE  Compressed: YES  Tag: DBV\_TESTDB6\_CSD
      >         Piece Name: /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_2\_03qakjgn\_1\_1.rman
      >   List of Datafiles in backup set 3
      >   File LV Type Ckp SCN    Ckp Time            Name
      >   ---- -- ---- ---------- ------------------- ----
      >   2       Full 960592     28/06/2015:13:52:23 /u01/app/oracle/oradata/testdb6dr/sysaux01.dbf
      >
      > BS Key  Type LV Size       Device Type Elapsed Time Completion Time
      > ------- ---- -- ---------- ----------- ------------ -------------------
      > 4       Full    4.30M      DISK        00:00:01     28/06/2015:13:52:55
      >         BP Key: 4   Status: AVAILABLE  Compressed: YES  Tag: DBV\_TESTDB6\_CSD
      >         Piece Name: /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_3\_04qakjhm\_1\_1.rman
      >   List of Datafiles in backup set 4
      >   File LV Type Ckp SCN    Ckp Time            Name
      >   ---- -- ---- ---------- ------------------- ----
      >   3       Full 960663     28/06/2015:13:52:54 /u01/app/oracle/oradata/testdb6dr/undotbs01.dbf
      >
      > BS Key  Type LV Size       Device Type Elapsed Time Completion Time
      > ------- ---- -- ---------- ----------- ------------ -------------------
      > 5       Full    1.05M      DISK        00:00:00     28/06/2015:13:53:04
      >         BP Key: 5   Status: AVAILABLE  Compressed: YES  Tag: DBV\_TESTDB6\_CSD
      >         Piece Name: /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_4\_05qakji0\_1\_1.rman
      >   List of Datafiles in backup set 5
      >   File LV Type Ckp SCN    Ckp Time            Name
      >   ---- -- ---- ---------- ------------------- ----
      >   4       Full 960724     28/06/2015:13:53:04 /u01/app/oracle/oradata/testdb6dr/users01.dbf
      >
      > RMAN> restore database from tag='DBV\_TESTDB6\_CSD';
      >
      > Starting restore at 28/06/2015:15:37:37
      > Starting implicit crosscheck backup at 28/06/2015:15:37:37
      > allocated channel: ORA\_DISK\_1
      > channel ORA\_DISK\_1: SID=26 device type=DISK
      > Crosschecked 5 objects
      > Finished implicit crosscheck backup at 28/06/2015:15:37:38
      >
      > Starting implicit crosscheck copy at 28/06/2015:15:37:38
      > using channel ORA\_DISK\_1
      > Finished implicit crosscheck copy at 28/06/2015:15:37:38
      >
      > searching for all files in the recovery area
      > cataloging files...
      > no files cataloged
      >
      > 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 /u01/app/oracle/oradata/testdb6dr/system01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_1\_01qakjeq\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_1\_01qakjeq\_1\_1.rman tag=DBV\_TESTDB6\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:01:15
      > 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 00002 to /u01/app/oracle/oradata/testdb6dr/sysaux01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_2\_03qakjgn\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_2\_03qakjgn\_1\_1.rman tag=DBV\_TESTDB6\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:35
      > 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 00003 to /u01/app/oracle/oradata/testdb6dr/undotbs01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_3\_04qakjhm\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_3\_04qakjhm\_1\_1.rman tag=DBV\_TESTDB6\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:03
      > 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 00004 to /u01/app/oracle/oradata/testdb6dr/users01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_4\_05qakji0\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/testdb6/dbv\_testdb6\_csd\_dbf\_4\_05qakji0\_1\_1.rman tag=DBV\_TESTDB6\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:01
      > Finished restore at 28/06/2015:15:39:33
    • Verify that the datafiles and control file are created on standby server:
      > oracle@dbvlab102[/u01/app/oracle/oradata/testdb6dr]: ls -lrt
      > total 1304920
      > -rw-r----- 1 oracle oinstall 775954432 Jun 28 15:38 system01.dbf
      > -rw-r----- 1 oracle oinstall 513810432 Jun 28 15:39 sysaux01.dbf
      > -rw-r----- 1 oracle oinstall  31465472 Jun 28 15:39 undotbs01.dbf
      > -rw-r----- 1 oracle oinstall   5251072 Jun 28 15:39 users01.dbf
      > -rw-r----- 1 oracle oinstall   9748480 Jun 28 15:40 control01.ctl

    OPTION (B): Restore using SET NEWNAME.

    Note: A different standby database is used in this example.

    • Connect to RMAN. Restore the standby control file and the datafiles:
      > [oracle@dbvlab102 dbs]$ rman target /
      > Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 26 15:13:32 2015
      > Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
      > connected to target database: DEV (not mounted)
      >
      > RMAN> restore standby controlfile from '/home/oracle/backup/dbv\_DEV\_csd\_stdby.ctl';
      >
      > Starting restore at 26/06/2015:15:14:23
      > 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=/u01/app/oracle/oradata/DEVDR2/control01.ctl
      > output file name=/u01/app/oracle/fast\_recovery\_area/DEVDR2/control02.ctl
      > Finished restore at 26/06/2015:15:14:25
      >
      > RMAN> alter database mount;
      >
      > database mounted
      > released channel: ORA\_DISK\_1
      >
      > RMAN> run {
      > 2> set NEWNAME for datafile '/u01/app/oracle/oradata/DEV/temp01.dbf' to '/u01/app/oracle/oradata/DEVDR2/temp01.dbf';
      > 3> set NEWNAME for datafile '/u01/app/oracle/oradata/DEV/users01.dbf' to '/u01/app/oracle/oradata/DEVDR2/users01.dbf';
      > 4> set NEWNAME for datafile '/u01/app/oracle/oradata/DEV/undotbs01.dbf' to '/u01/app/oracle/oradata/DEVDR2/undotbs01.dbf';
      > 5> set NEWNAME for datafile '/u01/app/oracle/oradata/DEV/system01.dbf' to '/u01/app/oracle/oradata/DEVDR2/system01.dbf';
      > 6> set NEWNAME for datafile '/u01/app/oracle/oradata/DEV/sysaux01.dbf' to '/u01/app/oracle/oradata/DEVDR2/sysaux01.dbf';
      > 7> restore database;
      > 8> switch datafile all;
      > 9> }
      >
      > executing command: SET NEWNAME
      > executing command: SET NEWNAME
      > executing command: SET NEWNAME
      > executing command: SET NEWNAME
      > executing command: SET NEWNAME
      >
      > Starting restore at 26/06/2015:15:48:13
      > 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 /u01/app/oracle/oradata/DEVDR2/system01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/dbv\_DEV\_csd\_dbf\_1\_07qacprs\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/dbv\_DEV\_csd\_dbf\_1\_07qacprs\_1\_1.rman tag=DBV\_DEV\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:01:15
      > 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 00002 to /u01/app/oracle/oradata/DEVDR2/sysaux01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/dbv\_DEV\_csd\_dbf\_2\_09qacptp\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/dbv\_DEV\_csd\_dbf\_2\_09qacptp\_1\_1.rman tag=DBV\_DEV\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:35
      > 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 00003 to /u01/app/oracle/oradata/DEVDR2/undotbs01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/dbv\_DEV\_csd\_dbf\_3\_0aqacpun\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/dbv\_DEV\_csd\_dbf\_3\_0aqacpun\_1\_1.rman tag=DBV\_DEV\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:03
      > 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 00004 to /u01/app/oracle/oradata/DEVDR2/users01.dbf
      > channel ORA\_DISK\_1: reading from backup piece /home/oracle/backup/dbv\_DEV\_csd\_dbf\_4\_0bqacpv2\_1\_1.rman
      > channel ORA\_DISK\_1: piece handle=/home/oracle/backup/dbv\_DEV\_csd\_dbf\_4\_0bqacpv2\_1\_1.rman tag=DBV\_DEV\_CSD
      > channel ORA\_DISK\_1: restored backup piece 1
      > channel ORA\_DISK\_1: restore complete, elapsed time: 00:00:01
      > Finished restore at 26/06/2015:15:50:08
      >
      > datafile 1 switched to datafile copy
      > input datafile copy RECID=5 STAMP=883410608 file name=/u01/app/oracle/oradata/DEVDR2/system01.dbf
      > datafile 2 switched to datafile copy
      > input datafile copy RECID=6 STAMP=883410608 file name=/u01/app/oracle/oradata/DEVDR2/sysaux01.dbf
      > datafile 3 switched to datafile copy
      > input datafile copy RECID=7 STAMP=883410608 file name=/u01/app/oracle/oradata/DEVDR2/undotbs01.dbf
      > datafile 4 switched to datafile copy input datafile copy RECID=8 STAMP=883410608 file name=/u01/app/oracle/oradata/DEVDR2/users01.dbf
    • Verify that the datafiles and control file are created on standby server:
      > oracle@dbvlab102[/usr/dbvisit/standby]: cd /u01/app/oracle/oradata/DEVDR2
      > oracle@dbvlab102[/u01/app/oracle/oradata/DEVDR2]: ls -lrt
      > total 1377628
      > drwxr-xr-x 2 oracle oinstall      4096 Jun 26 16:19 mkdir
      > -rw-r----- 1 oracle oinstall 775954432 Jun 28 16:30 system01.dbf
      > -rw-r----- 1 oracle oinstall 545267712 Jun 28 16:30 sysaux01.dbf
      > -rw-r----- 1 oracle oinstall  73408512 Jun 28 16:30 undotbs01.dbf
      > -rw-r----- 1 oracle oinstall   5251072 Jun 28 16:30 users01.dbf
      > -rw-r----- 1 oracle oinstall  20979712 Jun 28 16:30 temp01.dbf
      > -rw-r----- 1 oracle oinstall   9748480 Jun 29 14:44 control01.ctl
  6. Create a DDC file on the primary server. This will be the DDC file for standby #2.
    • On the primary server, simply copy an existing DDC file and give it a new filename:
      > oracle@dbvlab101[/home/oracle]: cd /usr/dbvisit/standby/conf
      > oracle@dbvlab101[/usr/dbvisit/standby/conf]: ls -ltr
      > total 308
      > -rw-r--r-- 1 oracle oinstall 41440 Jun 23 09:13 dbv\_DEV.env.201506251424
      > -rwxr-xr-x 1 oracle oinstall 41912 Jun 23 15:00 dbv\_ORACLE\_SID.env
      > -rw-r--r-- 1 oracle oinstall 41487 Jun 24 10:53 dbv\_testdb7.env
      > -rw-r--r-- 1 oracle oinstall 41463 Jun 25 14:35 dbv\_DEV.env
      > -rw-r--r-- 1 oracle oinstall 41473 Jun 26 16:19 dbv\_DEVDR2.env
      > -rw-r--r-- 1 oracle oinstall 41479 Jun 28 13:43 dbv\_testdb6.env
      >
      > oracle@dbvlab101[/usr/dbvisit/standby/conf]: cp dbv\_testdb6.env dbv\_testdb6dr.env
    • Using vi editor, change the values of ORACLE\_SID\_DEST and ARCHDEST and should be pointing to standby database #2.
      > oracle@dbvlab101[/usr/dbvisit/standby/conf]: vi dbv\_testdb6dr.env
      > [30 Standby Server Settings]
      > DESTINATION = dbvlab102
      > SSH\_PORT =
      > ORACLE\_SID\_DEST = testdb6dr
      > ORACLE\_HOME\_DR =
      > DBVISIT\_BASE\_DR = /usr/dbvisit
      > ARCHDEST = /home/oracle/dbvisit\_archdest/testdb6dr
      > MAX\_TIMES\_TRIED = 4
      > LEAVE\_COMPRESS\_DEST = Y
    • Make sure that ARCHDEST folder exists on both primary and standby #2 servers. Create the directory if necessary.
      oracle@dbvlab102 dbvisit\_archdest]$ mkdir -p /home/oracle/dbvisit\_archdest/testdb6dr
      oracle@dbvlab101[/usr/dbvisit/standby]: mkdir -p /home/oracle/dbvisit\_archdest/testdb6dr
    • Using SCP, copy the DDC file to standby server:
      > oracle@dbvlab101[/usr/dbvisit/standby/conf]: scp dbv\_testdb6dr.env oracle@dbvlab102:/usr/dbvisit/standby/conf
      > dbv\_testdb6dr.env                                              100%   41KB  40.5KB/s   00:00
      
  7. Perform ship and apply on primary and standby servers.
    • On the Primary server:
      > oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit testdb6dr
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 8719)
      > dbvisit started on dbvlab101: Sun Jun 28 16:08:02 2015 ()
      > =============================================================
      > >>> Obtaining information from standby database (RUN\_INSPECT=Y)...
      > >>> Note FORCE\_LOGGING is disabled in the primary database.
      >     Waiting 3 seconds for log switch completion...
      > >>> Sending heartbeat message... - done.
      > First time Dbvisit Standby runs, Dbvisit Standby configuration will be copied to dbvlab102...
      >   > Transferring 'dbv\_testdb6dr.env' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [4608 KB/s] - done.
      > Contacting Standby Database testdb6dr on dbvlab102...
      > Next standby sequence required for recovery (3).
      >
      > >>> Log file(s) for testdb6 will be transferred from dbvlab101 to dbvlab102...
      >
      >   > Transferring 'o1\_mf\_1\_3\_bryos614\_.arc.gz' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [39085 KB/s] - done.
      >   > Transferring 'o1\_mf\_1\_4\_bryvthsq\_.arc.gz' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [15344 KB/s] - done.
      >   > Transferring 'o1\_mf\_1\_5\_brywd09n\_.arc.gz' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [7035 KB/s] - done.
      >   > Transferring 'o1\_mf\_1\_6\_brywl8so\_.arc.gz' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [2516 KB/s] - done.
      >
      >     4 archive log transfers to dbvlab102 for testdb6 completed.
      >     Last sequence was 6.
      >     No Mail sent as SEND\_MAIL\_FLAG = N
      >
      > >>> Dbvisit Archive Management Module (AMM)
      >
      >     Config: number of archives to keep      = 0
      >     Config: number of days to keep archives = 7
      >     Config: archive backup count            = 0
      >     Config: diskspace full threshold        = 80%
      >
      >     Current disk percent full (/u01/app/oracle/fast\_recovery\_area) = 35%
      >
      >     Number of archive logs deleted = 0
      >
      > =============================================================
      > dbvisit ended on dbvlab101: Sun Jun 28 16:08:40 2015
      > =============================================================
    • On the Standby Server:
      > oracle@dbvlab102[/usr/dbvisit/standby]: ./dbvisit testdb6dr
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 9232)
      > dbvisit started on dbvlab102: Sun Jun 28 16:11:47 2015 ()
      > =============================================================
      >
      > >>> Log file(s) for testdb6dr from dbvlab101 will be applied to dbvlab102
      > 201506281611 - Log seq 3 thread 1 applied to standby database testdb6dr.
      > 201506281611 - Log seq 4 thread 1 applied to standby database testdb6dr.
      > 201506281611 - Log seq 5 thread 1 applied to standby database testdb6dr.
      > 201506281611 - Log seq 6 thread 1 applied to standby database testdb6dr.
      >     No Mail sent as SEND\_MAIL\_FLAG\_DR = N
      >
      > >>> Dbvisit Archive Management Module (AMM)
      >
      >     Config: number of archives to keep      = 0
      >     Config: number of days to keep archives = 7
      >     Config: diskspace full threshold        = 80%
      >
      > Processing /home/oracle/dbvisit\_archdest/testdb6dr...
      >     Archive log dir: /home/oracle/dbvisit\_archdest/testdb6dr
      >     Total number of archive files   : 4
      >     Number of archive logs deleted = 0
      >     Current Disk percent full       : 46%
      >
      > =============================================================
      > dbvisit ended on dbvlab102: Sun Jun 28 16:11:53 2015
      > =============================================================
  8. Run the log report to check if standby database #2 is in sync with primary. Otherwise, perform ship and apply until log gap value is 0.
    • On the Primary Server:
      >  oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit -i testdb6dr
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 9054)
      > dbvisit started on dbvlab101: Sun Jun 28 16:13:07 2015 ()
      > =============================================================
      >
      > Dbvisit Standby log gap report for testdb6 at 201506281613:
      > -------------------------------------------------------------
      > Standby database on dbvlab102 is at sequence: 6.
      > Primary database on dbvlab101 is at log sequence: 8.
      > Primary database on dbvlab101 is at archived log sequence: 7.
      > Dbvisit Standby last transfer log sequence: 6.
      > Dbvisit Standby last transfer at: 201506281608.
      >
      > Archive log gap for testdb6:  1.
      > Transfer log gap for testdb6: 1.
      > Standby database time lag (HH:MI:SS): 00:08:43.
      >     No Mail sent as SEND\_MAIL\_FLAG = N
      >
      > =============================================================
      > dbvisit ended on dbvlab101: Sun Jun 28 16:13:10 2015
      > =============================================================
      • Re-run ship and apply since log gap report above returns log gap value of 1.
    • On the Primary Server:
      > oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit testdb6dr
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 9109)
      > dbvisit started on dbvlab101: Sun Jun 28 16:13:33 2015 ()
      > =============================================================
      > >>> Obtaining information from standby database (RUN\_INSPECT=Y)...
      > >>> Note FORCE\_LOGGING is disabled in the primary database.
      > >>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
      >     dbvlab102...
      >
      >     No configurational differences found between dbvlab101 and dbvlab102.
      >
      > >>> Log file(s) for testdb6 will be transferred from dbvlab101 to dbvlab102...
      >   > Transferring 'o1\_mf\_1\_7\_brywsdt6\_.arc.gz' to server dbvlab102:7890
      >     Progress: 0%...20%...40%...60%...80%...100% [3696 KB/s] - done.
      >
      >     1 archive log transfer to dbvlab102 for testdb6 completed.
      >     Last sequence was 7.
      >     No Mail sent as SEND\_MAIL\_FLAG = N
      >
      > >>> Dbvisit Archive Management Module (AMM)
      >
      >     Config: number of archives to keep      = 0
      >     Config: number of days to keep archives = 7
      >     Config: archive backup count            = 0
      >     Config: diskspace full threshold        = 80%
      >
      >     Current disk percent full (/u01/app/oracle/fast\_recovery\_area) = 35%
      >
      >     Number of archive logs deleted = 0
      > =============================================================
      > dbvisit ended on dbvlab101: Sun Jun 28 16:13:48 2015
      > =============================================================
    • On the Standby Server:
      >  oracle@dbvlab102[/usr/dbvisit/standby]: ./dbvisit testdb6dr
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 9433)
      > dbvisit started on dbvlab102: Sun Jun 28 16:13:57 2015 ()
      > =============================================================
      > >>> Log file(s) for testdb6dr from dbvlab101 will be applied to dbvlab102
      > 201506281613 - Log seq 7 thread 1 applied to standby database testdb6dr.
      >     No Mail sent as SEND\_MAIL\_FLAG\_DR = N
      > >>> Dbvisit Archive Management Module (AMM)
      >     Config: number of archives to keep      = 0
      >     Config: number of days to keep archives = 7
      >     Config: diskspace full threshold        = 80%
      >
      > Processing /home/oracle/dbvisit\_archdest/testdb6dr...
      >     Archive log dir: /home/oracle/dbvisit\_archdest/testdb6dr
      >     Total number of archive files   : 5
      >     Number of archive logs deleted = 0
      >     Current Disk percent full       : 46%
      >
      > =============================================================
      > dbvisit ended on dbvlab102: Sun Jun 28 16:14:00 2015
      > =============================================================
    • On the Primary Server, run the Log Gap Report again:
      > oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit -i testdb6dr
      > =============================================================
      > Dbvisit Standby Database Technology (7.0.40.14168) (pid 9295)
      > dbvisit started on dbvlab101: Sun Jun 28 16:14:07 2015 ()
      > =============================================================
      > Dbvisit Standby log gap report for testdb6 at 201506281614:
      > -------------------------------------------------------------
      > Standby database on dbvlab102 is at sequence: 7.
      > Primary database on dbvlab101 is at log sequence: 8.
      > Primary database on dbvlab101 is at archived log sequence: 7.
      > Dbvisit Standby last transfer log sequence: 7.
      > Dbvisit Standby last transfer at: 201506281613.
      >
      > Archive log gap for testdb6:  0.
      > Transfer log gap for testdb6: 0.
      > Standby database time lag (HH:MI:SS): 00:05:55.
      >     No Mail sent as SEND\_MAIL\_FLAG = N
      >
      > =============================================================
      > dbvisit ended on dbvlab101: Sun Jun 28 16:14:11 2015
      > =============================================================
  9. Optional: You may want to open standby #2 to verify if restoration is successful.

    Note: Please make sure to bring the database back to mount state to prevent errors when applying the latest archive logs as changes cannot be applied in READ ONLY mode.

    • Login to standby database #2 and execute alter database open; statement.
      > oracle@dbvlab102[/usr/dbvisit/standby]: cd
      > oracle@dbvlab102[/home/oracle]: sqlplus '/as sysdba'
      >
      > SQL\*Plus: Release 11.2.0.4.0 Production on Sun Jun 28 16:16:35 2015
      > Copyright (c) 1982, 2013, Oracle.  All rights reserved.
      > Connected to:
      > Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
      >
      > SQL> select instance\_name from v$instance;
      > INSTANCE\_NAME
      > ----------------
      > testdb6dr
      >
      > SQL> select open\_mode from v$database;
      >
      > OPEN\_MODE
      > --------------------
      > MOUNTED
      >
      > SQL> alter database open;
      >
      > Database altered.
    • Restart standby database #2 to bring it back to mount state.
      • On the Standby Server:
        > oracle@dbvlab102[/usr/dbvisit/standby]: ./dbv\_oraStartStop restart testdb6dr
        > =============================================================
        > Dbvisit Standby Database Technology (7.0.40.14168) (pid 10842)
        > dbv\_oraStartStop started on dbvlab102: Mon Jun 29 13:42:47 2015 ()
        > =============================================================
        >
        > Shutting down standby Database testdb6dr...
        > Standby Database testdb6dr shutdown successfully.
        > Starting Standby Database testdb6dr...
        > Standby Database testdb6dr started .
        >
        > =============================================================
        > dbv\_oraStartStop ended on dbvlab102: Mon Jun 29 13:42:55 2015
        > =============================================================
        >
        > [oracle@dbvlab102 ~]$ sqlplus '/as sysdba'
        > SQL\*Plus: Release 11.2.0.4.0 Production on Mon Jun 29 13:43:10 2015
        > Copyright (c) 1982, 2013, Oracle.  All rights reserved.
        >
        > Connected to:
        > Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
        >
        > SQL> select db\_unique\_name, open\_mode from v$database;
        >
        >  DB\_UNIQUE\_NAME                   OPEN\_MODE
        >  ------------------------------    --------------------
        >  testdbdr                                 MOUNTED

Grace Tan July 02, 2015 17:09

Have more questions? Submit a request

Comments