Pre- and post-processing
It is possible to specify your own commands to run before or after Dbvisit Standby transfers or applies the log files. This can be either on the primary server, the standby server or on both.
On the primary server:
The sequence of events on the primary server is:
- Dbvisit Standby pre-processing (here your own commands may be executed)
- Dbvisit Standby transfers the archive logs
- Dbvisit Standby post-processing (here your own commands may be executed)
- Optional Dbvisit Standby Archive log Management Module
On the standby server:
The sequence of events on the standby server is:
- Dbvisit Standby pre-processing (here your own commands may be executed)
- Dbvisit Standby applies the archive logs
- Dbvisit Standby post-processing (here your own commands may be executed)
- Optional Dbvisit Standby Archive log Management Module
Pre and post settings
DBV_PRE_PROC | Specifies the name of the pre-processing script. |
Default value Windows: dbv_pre_processing.cmd | |
Default value Non Windows: dbv_pre_processing.sh | |
If a different named script should be called, then this variable can set in the DDC file. If no path name is given the Dbvisit Standby install directory is assumed. | |
Example: | |
   DBV_PRE_PROC = rman_backup.cmd | |
DBV_POST_PROC | Specifies the name of the post-processing script. |
Default value Windows: dbv_post_processing.cmd | |
Default value Non Windows: dbv_post_processing.sh | |
If a different named script should be called, then this variable can set in the DDC file. If no path name is given the Dbvisit Standby install directory is assumed. | |
Example: | |
   DBV_POST_PROC = post_procs_all.cmd |
Pre-processing (Windows)
The commands will run before Dbvisit Standby transfers or applies the log files. If the pre-processing has to take place before Dbvisit Standby transfers the log files on the primary server, the following commands need to be done on the primary server. If the pre-processing has to take place before Dbvisit Standby applies the log files on the standby server, the following commands need to be done on the standby server. The pre-processing will apply for all databases that use Dbvisit Standby on the server.
Â
1. Create an empty file called dbv_pre_processing.cmd in the Dbvisit Standby directory
Â
edit dbv_pre_processing.cmd
2. Enter the commands or call the script that you want to execute. If you want Dbvisit Standby to trap the return code and alert if this is not 0, then specify the return code as the exit code (see below). You must ensure that you set the correct return code in your calling script.
Â
call_rman.cmd
exit %errorlevel%
3. If the return code of the pre-processing script is > 0, Dbvisit Standby will stop, an alert will be sent, and Dbvisit Standby will not transfer or apply the log files.
Post-processing (Windows)
The commands will run after Dbvisit Standby has transferred or applied the log files. If the post-processing has to take place after Dbvisit Standby has transferred the log files on the primary server, the following commands need to be done on the primary server. If the post-processing has to take place after Dbvisit Standby has applied the log files on the standby server, the following commands need to be done on the standby server. The post-processing will apply for all databases that use Dbvisit Standby on the server.
Â
1. Create an empty file called dbv_post_processing.cmd in the Dbvisit Standby directory
Â
edit dbv_post_processing.cmd
2. Enter the commands or call the script that you want to execute. If you want Dbvisit Standby to trap the return code and alert if this is not 0, specify the return code as the exit code (see below). You must ensure that you set the correct return code in your calling script.
Â
backup_software.cmd
exit %errorlevel%
3. If the return code of the dbv_post_processing.sh script is > 0, Dbvisit Standby will stop and an alert will be sent. Dbvisit Standby will have transferred or applied the log files. If the Dbvisit Standby archive module is being used, the Dbvisit Standby archive module will not be invoked.