The Synchronise Standby Database, Failover and Graceful Switchover (GS - role reversal) operations can all be invoked in batch (unattended) mode.
To run in batch mode(Version 7.0):
dbvisit_setup --sync --ddc <DDC> --tmp_dir <tmp\_dir> --tmp_dir_dest <tmp\_dir\_dest> [--sync_lag] [--sync_nologging]
Specify tmp dirs on both primary and standby
—sync_lag – to synch the standby with the primary
—sync_nologging – to fix non logged transactions
To run in batch mode(Version 8.0):
[oracle@dbv1 /usr/dbvisit/standby]$ ./dbvctl --sync -h Syncronize standby database dbvctl -d ddc --sync [--mode CLI|BATCH|GUI] [--tmp_dir ] [--tmp_dir_dest ] [--sync_lag] [--sync_nologging] --mode CLI default --tmp_dir Existing tmp directory on primary --tmp_dir_dest Existing tmp directory on standby --sync_lag Sync standby that is lagging behind --sync_nologging Sync non logged transactions
For Version 7.0
dbv_oraStartStop activate <DDC> [Yes] [nosync]
By default, Dbvisit Standby will prompt before activating the standby database. If the YES
parameter is given, then Dbvisit Standby will no longer prompt before activating the standby database (batch mode).
If the nosynch
parameter is given, Dbvisit Standby will not transfer the updated (reversed) DDC file to the original primary if any schedules are running on the newly activated primary.
When the standby database is activated it is no longer possible to keep the new primary and the old primary databases in sync. A new standby database must be created after activation.
Updates the Dbvisit Database Configuration (DDC) file and reverses the primary and standby variables so that Dbvisit Standby processing can be reversed when a new standby database has been created.
For Version 8.0
dbvctl -d <ddc> -o activate [--force] [--nosync]
This command is used to Activate the standby database, during which process it becomes the new primary database. Important, this operation MUST be done with caution as the process is NOT reversible. This action is performed in the event that the primary database is no longer available. Dbvisit Standby will prompt before activating the standby database. If the --force option is provided then Dbvisit Standby will no longer prompt before activating the standby database (this option can be used in batch mode).
Note: On the event that APPLY_DELAY_LAG_MINUTES (i.e. APPLY_DELAY_LAG_MINUTES = 180) is set in the DDC, and standby is activated in batch mode, it will most likely fail or canceled. If APPLY_DELAY_LAG_MINUTES is set in the DDC, the correct way of activating the standby is via interactive mode and not using the option --force.
If the --nosync option is provided, Dbvisit Standby will not transfer the updated (reversed) DDC file to the original primary if any schedules are running on the newly activated primary. When the standby database is activated it is no longer possible to keep the new primary and the old primary databases in sync. A new standby database must be created after activation.
Before you activate the standby database, running a quick test by ensuring the standby database is in a consistent state (datafile headers and controlfile is in sync) and ready to be activated. This can be done by opening the standby database read-only.
This is done by running the following command: "./dbvctl -d DEV -o read"
Graceful Switchover (GS - role reversal)
For Version 7.0
dbv_oraStartStop switchover <DDC> [UNIQUE_KEY]
Initiates graceful switchover which reverses the roles between the primary and the standby databases. The primary database becomes the standby database and the standby database becomes the primary database. No data will be lost.
This process will shutdown and restart both the primary and standby databases. The control files of both the primary and standby database will be rebuilt. All historic information in the control file will be lost.
A unique key will be required to initiate the switchover. This is a unique number that has not been used before.
Example: 6678
Dbvisit Standby will warn if the key has been used before. If the key is specified on the command line, then the process can be run as a batch process. Dbvisit Standby will provide full roll forward or rollback steps if the process is interrupted and cannot complete.
For Version 8.0
./dbvctl -d <DDC> -o switchover
You only have to execute this command on one of the servers (primary or standby). It is recommended to use the primary.
Mike Donovan May 26, 2014 13:22
Comments