User scripts is a feature available across all three database platforms and enables you to easily integrate your custom scripts with failover or switchover process.
1. Concept
User scripts acts as a library of your custom scripts which you can use to execute individual scripts directly after failover or switchover.
User scripts will not be executed during automatic failover
The selection and execution of the user script is always done in following sequence:
A. User adds custom scripts to the dbvcontrol library
B. User starts failover or switchover process and selects individual scripts which will be executed after failover or switchover completes
C. Failover or switchover execution
D. Execution of User Scripts
User Scripts feature is the same for all database platforms with no differences.
Oracle Platform Only: “User Scripts” is completely unrelated an independent feature from “Pre/Post Processing” feature: Pre/Post Processing which enables you run custom scripts automatically after various actions including failover or switchover.
2. Adding User Scripts
To add custom scripts to the library, we need to select “User Scripts” in the ACTIONS pane:
Click on Add (1) and enter full path for your script or use Browse button (2):
Once finished, click on save (3). Script will then be visible in the list:
The process is the same for Oracle, SQL Server and PostgreSQL platforms.
3. Running User Scripts
You will be able to select the scripts you added & execute them after switchover and failover operations. This example shows Oracle Switchover:
You will first need to expand the User Scripts Interface by clicking on (1) and afterwards check which script to execute (2). You will alway need to manually select those scripts to be execute.
Comments