How the Oracle agent supports health check monitoring

The Cluster Server agent for Oracle uses the Oracle health check APIs to determine whether the Oracle instance on a node was shut down gracefully or was it aborted. When an oracle instance is shut down gracefully outside of VCS control the agent acknowledges the operation as intentional offline.

The Oracle health check APIs are supported on all UNIX platforms, Oracle Database 10g Release and later.

You can use the build_oraapi.sh script to link the libraries that are required for Oracle health check monitoring. ships the build_oraapi.sh script along with the VCS agent for Oracle in the Oracle agent's /opt/VRTSagents/ha/bin/Oracle directory.

Generating the executable required for Oracle health check monitoring

Review the considerations before using the build_oraapi.sh script.

Considerations to run the build_oraapi.sh script
  • Run the build_oraapi.sh script on each node of the cluster where you want to use Oracle health monitoring.

  • You need to run the build_oraapi.sh script to relink the Oracle libraries whenever the Oracle database version is upgraded on a node.

  • The Oracle health check binaries generated in the Oracle agent directory correspond to the ORACLE_HOME directory and the Oracle database version that are specified while executing the build_oraapi.sh script. ORACLE_HOME can be set as an environment variable or specified as a command line option. The Oracle database version can be specified as a command line option with the build_oraapi.sh script.

  • Veritas ships the build_oraapi.sh script in VCS 6.2 and later releases. Veritas will not ship the pre-built Oracle health check binaries (oraapi_32, oraapi_3211g, oraapi_64, and oraapi_6411g).

  • To enable health check support in Oracle agent, you must run the build_oraapi.sh script to build the Oracle health check binaries based on Oracle version.

Building the Oracle agent executable using the build_oraapi.sh script

To build the Oracle agent executable using the build_oraapi.sh script:

  1. Log in as root user on the node.
  2. Set the Oracle home directory path.

    # export ORACLE_HOME=/u01/oraHome

    where, /u01/oraHome is the Oracle home directory that stores files.

  3. Access the Oracle agent directory.

    # cd /opt/VRTSagents/ha/bin/Oracle

  4. Run the following command from the Oracle agent directory.

    # ./build_oraapi.sh -version <version>

    where version is the Oracle database version on the node.

  5. Alternatively, if you did not set the ORACLE_HOME variable, you can set the oracle_home parameter as a command line option.

    #./build_oraapi.sh -version <version> -oracle_home /u01/oraHome

    where version is the Oracle database version on the node and /u01/oraHome is the Oracle home directory path, which is set as the ORACLE_HOME variable value.

The script generates binaries under agent directory /opt/VRTSagents/ha/bin/Oracle. Oracle health check binaries generated on a node is based on the system architecture (32 bit or 64 bit) available on that node, and the full Oracle version.

For example, oraapi_64_121010 is a binary created with Oracle version 12 on a 64-bit system.

See Verifying the Oracle health check binaries and intentional offline for an instance of Oracle .