Following steps need to be performed to synchronize standby database using the Dbvisit Standby Command Line Interface (CLI).
Step 1: On the Primary Node execute the “dbvsit_setup” command (If this is part of a RAC environment, this step can be done on any of the primary nodes):
|
Step 2: Once this is executed on the Primary node, you will be presented with the following menu from which you can select option 8, “Synchronize Standby Database”
|
Step 3: Once you select option 8, you will be asked to confirm the database environment (DDC).
In this example, prmary database name and DDC name is testdb.
|
Once you have confirmed that you want to continue with the re-synchronization of the standby database, Dbvisit Standby will extract information from both the primary and standby databases and display it for your review.
|
At this point in time, you can select to synchronize standby database using incremental backups from SCN or to synchronize standby database to address nologging changes. You can also select both options as well. It also asks for temporary location on primary and standby server to to store the incremental RMAN backups that will be created from the primary, which will then be applied to the standby.
|
Once standby database is synchronised, run default command first on the primary(send archive) and then on the standby(apply archive) servers. |
The example below is showing the running of the Synchronise Standby database in a RAC environment.
The process is run from only one of the RAC nodes and is the same as when you would run it for a single instance environment
oracle@dbvrlin301[/usr/dbvisit/standby]: ./dbvisit_setup ========================================================= Dbvisit Standby Database Technology (7.0.36.13688) http://www.dbvisit.com ========================================================= =>dbvisit_setup only needs to be run on the primary server. Is this the primary server? <Yes/No> [Yes]: ========================================================= Dbvisit Standby Database Technology (7.0.36.13688) 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 : 8 ------------------------------------------------------------------------------ =>Sync 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) TSTRAC1 2) Return to menu Please enter choice : 1 Is this correct? <Yes/No> [Yes]: Database TSTRAC1 is up. ------------------------------------------------------------------------------- Use RMAN incremental backups to synchronise a physical standby database with the primary database. RMAN incremental backup of the primary database will be created, starting at the current SCN of the standby, which in turn will then be used to roll the standby database forward in time. RMAN incremental backups can be useful in case the physical standby database: Is lagging far behind the primary database. Has widespread nologging changes. Has nologging changes on a subset of datafiles. ------------------------------------------------------------------------------- Continue? <Yes/Cancel> [Yes]: Querying database... Please wait... ------------------------------------------------------------------------------- SUMMARY ------------------------------------------------------------------------------- PRIMARY Current SCN: 1777279 Time: 2015-03-03:15:50:03 Current sequence(s): Thread 1 Sequence 44 Thread 2 Sequence 21 Last archived sequence(s): Thread 1 Sequence 43 Thread 2 Sequence 20 STANDBY Current SCN: 1770746 Time: 2015-03-03:15:11:13 Next SCN required for recovery: 1770747 Time: 2015-03-03:15:11:13 Sequence(s) required for recovery: Thread 1 Sequence 39 Thread 2 Sequence 20 No nonlogged transactions detected in standby datafiles. ------------------------------------------------------------------------------- Synchronize standby database using incremental backups from SCN 1770747? [Yes]: Is this correct? <Yes/No> [Yes]: ------------------------------------------------------------------------------- A temporary location must be specified on dbvrlin301 where the database will be backed up to first. This location must be big enough to hold RMAN incremental backup of the primary database). Specify the location on dbvrlin301: [/usr/tmp]: Directory for temporary location will be: /usr/tmp Is this correct? <Yes/No> [Yes]: ------------------------------------------------------------------------------- A temporary location must be specified on dbvrlin305 where the backup will be copied to before being applied. This location must be big enough to hold RMAN incremental backup of the primary database). Specify the location on dbvrlin305: [/usr/tmp]: Directory for temporary location will be: /usr/tmp Is this correct? <Yes/No> [Yes]: ------------------------------------------------------------------------------- Synchronising Standby Database ------------------------------------------------------------------------------- Step 1 - Deleting previous incremental backup... - done. Step 2 - Creating incremental backup of primary database... - done. Step 3 - Creating standby control file... - done. Step 4 - Transferring backup to standby server... - done. Step 5 - Restoring standby control file... - done. Step 6 - Cataloguing incremental backup in RMAN catalogue... - done. Step 7 - Applying incremental backup to the standby database... - done. Step 8 - Performing log switch on primary... - done. Step 9 - Obtaining sync summary... - done. Step 10 - Updating Dbvisit repository... - done. ------------------------------------------------------------------------------- SUMMARY ------------------------------------------------------------------------------- PRIMARY Current SCN: 1777519 Time: 2015-03-03:15:52:43 Current sequence(s): Thread 1 Sequence 45 Thread 2 Sequence 22 Last archived sequence(s): Thread 1 Sequence 44 Thread 2 Sequence 21 STANDBY Current SCN: 1777442 Time: 2015-03-03:15:51:15 Next SCN required for recovery: 1777381 Time: 2015-03-03:15:50:53 Sequence(s) required for recovery: Thread 1 Sequence 44 Thread 2 Sequence 21 No nonlogged transactions detected in standby datafiles. ------------------------------------------------------------------------------- To complete standby database sync run dbvisit on all primary nodes, then on the standby. If a primary node was down during sync operation, you need to run dbvisit with -R option on this node. Please press <Enter> to continue... |