4.0.0 HP PolyServe Software for Microsoft SQL Server Administration Guide (T5392-96056, March 2010)

Script Pathnames: The monitor can optionally be configured with the following types of scripts:
Recovery script. Runs after a monitor probe failure is detected, in an attempt to restore the service.
Post Start script. Runs after the service has become active on a server. For example, you might
want a Post Start script to start a Web server.
Pre Stop script. Runs after the service has become inactive on a server.
When a monitor is instantiated, the ClusterPulse process chooses the best server to make the service
active. The Post Start script is run on this server. On all other servers configured for the monitor, the
Pre Stop script is run to ensure that the service is not active.
Post Start scripts must be robust enough to run when the service is already started, without considering
this to be an error. Similarly, Pre Stop scripts must be robust enough to run when the service is already
stopped, without considering this to be an error. In both of these cases, the script should exit with a
zero exit status.
This behavior is necessary because the Post Start and Pre Stop scripts are run to establish the desired
start/stop activity, even though the service may actually have been started by something other than
HP PolyServe Software. The Post Start and Pre Stop scripts must also handle recovery from events that
may cause them to run unsuccessfully.
For example, if the system encounters a problem, the script will fail and exit non-zero. The service
could then become active on another node, causing the Pre Stop script to run on the original node
even though the Post Start script did not complete successfully.
Use custom scripts to modify Start/Stop activities
The monitor performs certain starting or stopping activities. If you need to take an action before or
after the starting or stopping activity, you can create a custom Start or Stop script for the action and
specify it on the Scripts tab for the monitor.
The default order for starting is:
Run the monitors starting activities (if any)
the custom Start script (if any)
HP PolyServe Software for Microsoft SQL Server administration guide 65