3.5.1 MxDB-Oracle-HiAv Installation and Administration Guide
Chapter 2: Operations 44
Copyright © 1999-2007 PolyServe, Inc. All rights reserved.
Custom Virtual Oracle Service Start/Stop
and Probe Scripts
MxDB-Oracle-HiAv ships with default probe, start and stop scripts that
generally suffice for production usage. However, Oracle is a complex
product and Oracle IT shops vary widely in their usage of the product. To
that end, it is nearly impossible to provide a default set of start, stop and
probe scripts that meet the needs of all sites. For instance, it may be
desirable to have probe actions that ensure access to a specific application
table or to send a message to a DBA based on certain criteria. To address
this issue, MxDB-Oracle-HiAv supports the concept of site-specific start,
stop and probe scripts.
There is an existing framework into which custom start/stop and probe
scripts must integrate. The following rules apply:
1. To implement custom start/stop and probe scripts, you must place a
copy of the four default scripts into the scripts subdirectory under the
common OFA location of ${
ORACLE_BASE}/admin/<DBNAME>/scripts.
Use these scripts as the template to add your site-specific actions.
2. The custom scripts must satisfy the high-level Matrix Server
high-availability engine requirements as pertaining to return values.
To prepare for custom start/stop and probe script deployment, cd to the
${
ORACLE_BASE}/admin/<DBNAME>/scripts directory. Next, copy the
default scripts from the product as follows:
$ cd ${ORACLE_BASE}/admin/${ORACLE_SID}/scripts
$ cp /opt/polyserve/mxdb_oracle_ha/lib/mxdb_*.sql .
$ ls -l mxdb*
-rwxr-xr-x 1 oracle oinstall 93 Apr 13 11:43 mxdb_abort.sql
-rwxr-xr-x 1 oracle oinstall 97 Apr 13 11:43 mxdb_immediate.sql
-rwxr-xr-x 1 oracle oinstall 690 Apr 13 11:43 mxdb_probe.sql
-rwxr-xr-x 1 oracle oinstall 124 Apr 13 11:43 mxdb_start.sql
$ pwd
/u01/app/oracle/admin/PROD/scripts
The probe script is the most sensitive to this framework. Custom probe
scripts must return the proper textual feedback to the higher-level Matrix
Server high availability engine. A successful probe must return two
critical tokens indicating the database role and state. The tokens are either
“
PRIMARY” and “OPEN” or “STANDBY” and “MOUNTED.” These text