3.6.0 MxDB for SQL Server Installation and Administration Guide (5697-7088, December 2007)
Chapter 5: Configuration and Operation 66
Copyright © 1999-2007 PolyServe, Inc. All rights reserved.
Script Pathnames: The SQL 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 MxDB for SQL
Server. 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 SQL 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 monitor’s starting activities (if any)