Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

It is possible to specify your own commands to run schedule your own pre- or post processing script as part of the Dbvisit Standby execution.  A good example of doing this is if you want to execute your own custom code to perform certain tasks 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:

  1. Dbvisit Standby pre-processing (here your own commands may be executed)
  2. Dbvisit Standby transfers the archive logs
  3. Dbvisit Standby post-processing (here your own commands may be executed)
  4. Optional Dbvisit Standby Archive log Management Module

On the standby server:
The sequence of events on the standby server is:

  1. Dbvisit Standby pre-processing (here your own commands may be executed)
  2. Dbvisit Standby applies the archive logs
  3. Dbvisit Standby post-processing (here your own commands may be executed)
  4. Optional Dbvisit Standby Archive log Management Module

Pre and post settings

...

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

Section
Column
width5%

 

Column
width95
Panel
bgColorCCC
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.

Section
Column
width5%

 

Column
width95
Panel
bgColorCCC
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

Section
Column
width5%

 

Column
width95
Panel
bgColorCCC
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.

Section
Column
width5%

 

Column
width95
Panel
bgColorCCC
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 invokedsends or apply logs; or it can be to execute a script after you have opened the standby database read-only to start reporting extracts or any other custom code you would want to execute.

 

This section will provide you with an overview of how you can how you can do this.  Please note that this option of executing pre- or post processing scripts was available in earlier releases and therefor this section will be split into two sections:

  • Pre- and Post-processing using PRE_POST_PROCESSING (new in version 7)
    This is the new recommended way where one script is used for both pre- and post-processing.  
    This script will be passed parameters indicating if it should execute pre or post tasks and what the Dbvisit Standby process is that is being called. 

 

  • Pre- and Post-processing using DBV_PRE_PROC and DBV_POST_PROC (version 6)
    This section will cover the pre- and post-processing options as was available in Dbvisit Standby version 6.  
    This option is still available in version 7 for backward compatibility, but it is recommended that you migrate to using the PRE_POST_PROCESSING parameter using one script to handle both pre- and post-processing.