HP Serviceguard Enterprise Cluster Master Toolkit User Guide, December 2012 (5900-2145)

The attribute, DB_SERVICE is used to start and stop the DB service through the DB package. This
attribute is commented by default. You can either set the attribute DB_SERVICE to all or specify
the DB service names that needs to be started and stopped by the DB package.
To start and stop all DB services configured in the DB, managed by this package, set this attribute
to all.
For example: ecmt/oracle/oracle/DB_SERVICE all
To start and stop one or more specific DB services through this DB package, you must specify the
service names using multiple instances of this attribute, as shown in the following example:
Example:
ecmt/oracle/oracle/DB_SERVICE <service1>
ecmt/oracle/oracle/DB_SERVICE <service2>
ecmt/oracle/oracle/DB_SERVICE <service3>
Support for database hang detection
This feature enables you to configure a separate service which will detect the database hang and
then takes appropriate action if a hang is detected. Database hang is detected by connecting to
the database and checking its status. If this process takes an unusually long time or if toolkit is
unable to retrieve the database status, it is considered that the database is in a hang state. While
configuring this service, you can also configure the following two options:
1. TIMEOUT: This attribute defines the wait time of the script for the database hang check to
return success. If the database health cannot be determined within this time after connecting
to the database, it is assumed that the database is in a hang state. It can have any positive
integer as value. The default value for TIMEOUT is 30 (seconds). This should not be confused
with the TIME_OUT package attribute or the service_halt_timeout attribute.
2. ACTION: This attribute defines the action that you must take, if you detect a database hang.
Currently, this attribute can take one of the following values:
log - Log a message. A message is logged to the package log every time a hang is
detected. If the MONITOR_INTERVAL attribute is set to 30 seconds, a message is logged
to the package log file every 30 seconds.
alert - Send an alert mail. An alert mail is sent to the email address specified with the
ALERT_MAIL_ID attribute. The mail is sent only the first time a database hang is detected.
failover - Failover the package to adoptive node.
The default value for ACTION is 'failover'.
The syntax of the service command is as follows: service_cmd
"$SGCONF/scripts/ecmt/oracle/tkit_module.sh oracle_hang_monitor <TIMEOUT> <ACTION>"
The following is an example in which the TIMEOUT is set to 40 seconds and the ACTION is set
to 'alert':
service_name db_hang_check
service_cmd "$SGCONF/scripts/ecmt/oracle/tkit_module.sh oracle_hang_monitor 40 alert"
service_restart none
service_fail_fast_enabled no
service_halt_timeout 300
Support for sourcing the user defined environment variables for Oracle Instance
It optionally provides a way to set the environment variables specific to Oracle instance during
package startup.
To set the environment variables specific to Oracle instance during package startup, follow the
steps:
20 Using the Oracle Toolkit in an HP Serviceguard Cluster