Commands overview
The following list gives an overview of the Dbvisit Standby commands available in the command line interface (CLI).
Where DDC is the name of the Dbvisit Database Configuration. In most cases this is the same as the database name. The DDC refers to the DDC file name which is in the form: dbv_DDC.env and contains the Dbvisit Standby settings for a particular primary and standby configuration.
Convention
"<>"
"[ ]"
Commands shown in "< >" are supplied by the user and are not optional. Do not include the "< >" as part of the command.
Commands shown in square brackets are optional commands. Do not include the "[ ]" as part of the command.
Â
Â
Command | Description |
---|---|
dbvisit | Dbvisit Standby help. Displays the Dbvisit Standby help pages. |
dbvisit <DDC> | Normal Dbvisit Standby operation. This command is run on primary and standby servers. |
Transfers log files from primary database if run on primary server. | |
Applies log files to standby database if run from standby server. | |
dbvisit -i <DDC> | Reports on the log sequences of: |
1. Latest archived log of primary database | |
2. Latest non archived log of primary database (redo log) | |
3. Latest log sequence of standby database | |
4. Latest log sequence sent by Dbvisit Standby | |
It also reports on the: | |
Archive log gap which is difference between the last archived sequence on the primary and the last applied sequence on the standby database. The archive log gap should be near 0 | |
(except when APPLY_DELAY_LAG_MINUTES is used). | |
Transfer log gap which is the difference between the last archived sequence on the primary and the last sequence transferred to the standby server. The transfer log gap should be near 0. | |
No log switches are performed on the primary database, and no logs are transferred. | |
Every time this command is run, the information is inserted into Dbvisit Standby database repository (DDR) table dbv_sequence_log. Reports can be produced from this table for trend analysis over time. | |
Dbvisit Standby will start the standby database if the standby database is not running and AUTO_START_STANDBY_DB = Yes. | |
This command may be scheduled in cron or other scheduler on a regular basis to provide Dbvisit Standby log gap analysis data over time. | |
Can only be run on the primary server. | |
dbvisit -r <sequence> <DDC> | Specific log and all subsequent logs will be resend to the standby database. |
sequence is the log sequence number from which Dbvisit Standby will start transferring logs until the current log. | |
Can only be run on the primary server. | |
See Resending Logs. | |
dbvisit -R <DDC> | Used when standby database has been rebuilt. |
Resynchronise primary database with standby database. | |
Dbvisit Standby will connect to the standby database and determine the next log which needs to be applied. This log and all subsequent logs will be transferred from the primary database until the current log. | |
The standby database must be available in order to execute this command. | |
Can only be run on the primary server. | |
dbvisit -c <DDC> | Copy the Dbvisit Standby installation and configuration (DDC) file from the primary server to the standby server. |
This function is performed automatically by Dbvisit Standby every time it executes depending on settings SYNCH_DBVISIT_INSTALL and SYNCH_ENV_FILE_ONLY. | |
Can only be run on the primary server. | |
Dbvisit Standby installation and configuration files (DDC) will be overridden on the standby server. | |
Performs a checksum comparison between the original file (or executable) and the transferred file (or executable). | |
dbvisit -c <DDC> <nocksum> | Copy the Dbvisit Standby installation and configuration files (DDC) from the primary server to the standby server. |
Can only be run on the primary server. | |
Dbvisit Standby installation and configuration files (DDC) will be overridden on the standby server. | |
Does not perform a checksum comparison between the original file (or executable) and the transferred file (or executable). | |
dbvisit -ReverseCopy <DDC> | Copy the Dbvisit Standby installation and environment files from the standby server to the primary server. |
Can only be run on the standby server. | |
Dbvisit Standby installation and configuration files (DDC) will be overridden on the primary server. | |
This option can be used to test the transfer mechanism between the standby and primary server where the standby server initiates the transfer instead of the primary server. | |
dbvisit -lic <DDC> | Displays the Dbvisit Standby license for a particular database. This can be VALID, INVALID or DEMO. |
When the DEMO license has expired, a Dbvisit Standby license must be purchased in order to continue to use Dbvisit Standby. | |
Can only be run on the primary server. | |
dbvisit -lic <DDC> <licensed_user> <license> | Sets the Dbvisit Standby license for particular database. The license will be verified. If the license is correct, the words VALID will be displayed. |
Can only be run on the primary server. | |
dbvisit_setup | Run the Dbvisit Standby setup and configure utility. This can do the following: |
1. New database or RAC Instance setup | |
2. Create standby database | |
3. New Dbvisit Standby Database Configuration (DDC) file setup | |
4. New Dbvisit Standby Archive log Management Module (AMM) setup | |
5. New Dbvisit Standby database repository (DDR) setup | |
6. Manage the database repository (DDR)Â | |
7. Update Dbvisit Standby Database Configuration (DDC) file | |
8. Uninstall Dbvisit Standby | |
dbv_oraStartStop start <DDC> | Starts the database. This may be either a regular (primary) database or a standby database. Dbvisit Standby will determine if the database is a primary or a standby database and will start it accordingly. |
dbv_oraStartStop stop <DDC> | Stops (shutdown) the database. This may be either a regular (primary) database or a standby database. Dbvisit Standby will determine if the database is a primary or a standby database and will start it accordingly. |
dbv_oraStartStop restart <DDC> | Stops (shutdown) and then starts the database. This may be either a regular (primary) database or a standby database. Dbvisit Standby will determine if the database is a primary or a standby database and will stop and start it accordingly. |
dbv_oraStartStop status <DDC> | Displays the status of the database. This can be either a regular (primary) database or a standby database. |
dbv_oraStartStop open <DDC> | Opens the standby database in READONLY mode. |
dbv_oraStartStop activate <DDC> [Yes] | In the event the primary database is no longer available. Activates the standby database to become a primary database. Activation cannot be reversed. A new standby database will have to be built. |
To disable the prompt to confirm that the database can be activated specify Yes on the command line. | |
dbv_oraStartStop switchover <DDC> [unique_key] | Initiates the Graceful Switchover process to transition the primary database to a standby database and the standby database to a primary database. This command must be given on both the primary and the standby servers. |
There is no loss of data during the transition and the standby database does not have to be rebuilt. | |
To run in batch mode, a unique key can be specified on the command line. This unique key must be the same on both the primary and standby server and can be any number not used before. | |
dbv_oraStartStop update_ddc_file <DDC> | Updates the Dbvisit Standby Database Configuration (DDC) file dbv_<DDC>.env to allow Dbvisit Standby to continue processing after Graceful Switchover or when activating the standby database to become the new primary database. All variables associated with the transition from the primary database to the standby database will be updated automatically. A backup copy (which is time stamped) will be made before the Dbvisit Standby Database Configuration (DDC) file is be updated. |
This option is part of normal Graceful Switchover processing. | |
dbv_functions -h | Brings up help for dbv_functions. This performs various Dbvisit Standby functions like compression, copying, repository reporting, creating control file, list %full Diskspace, checksum etc. This utility may also be used on its own. |
Examples
Command | Description |
---|---|
dbvisit dbvprod1 | Run Dbvisit Standby for database dbvprod1. |
dbvisit_setup | Setup and configure Dbvisit Standby for a specific database. |
Also: | |
- Creates Standby Databases.             | |
- Configures the Dbvisit Standby Archive Management Module. | |
- Manages the Dbvisit Standby repository. | |
- Updates the Dbvisit Standby database configuration file (DDC). | |
dbvisit -r 345 dbvprod1 | Run Dbvisit Standby starting at sequence 345 until the current sequence for database dbvprod1. |
Standby database does not need to be up and running. | |
dbvisit -R dbvprod1 | Resynch. Contact the standby database to find the next sequence that it requires. Resend starting from this sequence for database dbvprod1. |
Standby database needs to be up and running. | |
dbvisit -i dbvprod1 | Reports on the log sequences of database dbvprod1: |
1. Latest archived log of primary database | |
2. Latest non archived log of primary database (redo log) | |
3. Latest log sequence of standby database | |
4. Latest log sequence sent by Dbvisit Standby | |
5. Archive log gap | |
6. Transfer log gap | |
dbvisit -lic dbvprod1 | View the license status of database dbvprod1. The options are: |
1. VALID – License is valid. | |
2. DEMO – Demo license that can be used for 30 days. | |
3. INVALID – Demo license has expired or license entered is not correct. | |
dbvisit -lic dbvprod1 Avisit 3654 | Set new license for licensed username Avisit and license number 3654 for database dbvprod1. |
dbv_oraStartStop start dbvprod1 | Start database dbvprod1. |
dbv_oraStartStop status dbvprod1 | Display the status of database dbvprod1. |
dbv_oraStartStop activate dbvprod1 | Activates standby database dbvprod1 to become a primary database. |
dbv_oraStartStop activate dbvprod1 | Initiate Graceful Switchover between the primary and the standby database. The primary database transitions to a standby database and the standby database transitions to a primary database. There is no loss of data during the transition and the standby database does not have to be rebuilt. |