Enabling health check monitoring in Veritas Cluster Server agent for Oracle with SFHA 6.0.5

book

Article ID: 100011847

calendar_today

Updated On:

Description

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.0.5 release. Veritas will not ship the pre-built Oracle health check binaries (oraapi_32, oraapi_3211g, oraapi_64, and oraapi_6411g).

 

Building the executable required for Oracle health check monitoring using the build_oraapi.sh script

 

To build the executable required for Oracle health check monitoring 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=< oracle_home>

where,   oracle_homeis 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 (10 or 11 or 12) 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  < oracle_home>

where   version   is the Oracle database version (10 or 11 or 12)   on the node and   oracle_homeis the Oracle home directory path.

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

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

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

Verify the state of Oracle instance using the steps mentioned below, the Oracle health check binaries, and intentional offline behavior for an Oracle agent.

Note:

The steps listed in the table below should be executed by the operating system user specified in Owner attribute of Oracle resource in VCS.

The below table on Oracle health check options lists the checks you can verify with Oracle health check binaries.

Verify

Solution

If the ORACLE_HOME variable is set.

Run the following command to verify that the   $ORACLE_HOME   variable is correctly set.

# echo $ORACLE_HOME

Set the ORACLE_HOME environment variable if it is not already set. For example, run the following command to set the ORACLE_HOME variable:

# ORACLE_HOME=/u01/oraHome
# export ORACLE_HOME

where   /u01/oraHome   is the Oracle home directory path.

If the SID for the Oracle instance is set.

Run the following command to verify that the   $ORACLE_SID   variable is correctly set.

# echo $ORACLE_SID

If required, run the following commands to set the   $ORACLE_SID   variable:  

# ORACLE_SID=db  

# export ORACLE_SID

Where db is oracle SID

If the library path is set.

Run the following command to verify that the   $LD_LIBRARY_PATH   variable is correctly set.

# echo $LD_LIBRARY_PATH

If required, run the following commands to set the   $LD_LIBRARY_PATH   env variable

# LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH  

# export LD_LIBRARY_PATH

If the Oracle instance is online.

Run the following command to verify that the Oracle health check binary reports the status correctly:

# ./oraapi_< 32|64>

where     is the Oracle version.

For example,   # ./oraapi_6411g, where oraapi_6411g is the binary built for 64-bit Oracle version 11.

The system displays the following message:

Instance is online

Run   # echo $?

If the system displays 110 the instance is online and active.

If the Oracle instance is offline.

Run the following command to verify that the Oracle health check binary reports the status correctly:

# ./oraapi_< 32|64>

where     is the Oracle version.

For example,   # ./oraapi_6411g, where oraapi_6411g is the binary built for 64-bit Oracle version 11.

The system displays the following message:

Failure: Instance Shutdown           class: SOFT
Proper Shutdown

Run   # echo $?

If the system displays 100 the instance is offline.

If the Oracle instance is abnormally terminated.

If any of the important Oracle process is killed (for example, ora_pmon_, ora_smon_), the Oracle instance is abnormally terminated. In such a case run the Oracle health check binary, and the system displays following message:

For example, run   # ./oraapi_6411g

Failure: Abnormal Termination
class: SOFT
Abnormal termination

Run   # echo $?

If the system displays 98 the termination of Oracle processes. The VCS resource fails over as Oracle termination was abnormal and not intentional.

Enabling the health check monitoring and intentional offline behavior of the VCS Oracle resource

Perform the following steps to verify if VCS Oracle agent determines a graceful shutdown of a resource as intentional offline.

1.     Set   IntentionalOffline   and   MonitorOption   attributes to 1 for all the VCS Oracle resource, where intentional offline and healthcheck monitoring needs to be enabled.

Verifying the intentional offline behavior of the VCS Oracle agent

1.     Bring the resource online.

# hares -online ORA_oraprod -sys   system

where   system   is the name of the system that has Oracle database installed.

2. Stop the Oracle instance properly outside VCS control.

# su - oracle

$ sqlplus "/ as sysdba"

 The system displays the following message: 
 SQL> shutdown immediate 
 Database closed. 
 Database dismounted. 

3. You can verify the log files to confirm if the shutdown was graceful.

 Sample log message: 
 VCS INFO V-16-1-13470 Resource ORA_oraprod  
 (Owner: Unspecified, Group: ORA_PROD_Group) is offline on system.  
 (Intentional But NOT initiated by VCS)  

Oracle agent has identified the Intentional offline for the resource.


Applies To

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

Resolution

Veritas Cluster Server agent for Oracle provides high availability for Oracle database software. The agents include resource type declarations and agent executables. The agent for Oracle monitors the Oracle processes, brings them online, and takes them offline.

The Veritas Cluster Server agent for Oracle uses the Oracle health check APIs to determine the state of Oracle database instance. In addition when Oracle instance is brought down, it determines    whether Oracle instance on a node was gracefully shut down. 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.

From VCS version 6.0.5 onwards, you can use the   build_oraapi.sh   script to generate the executables that are required for Oracle health check monitoring. Veritas ships the   build_oraapi.sh   script along with the VCS agent for Oracle in the Oracle agent's   directory, /opt/VRTSagents/ha/bin/Oracle .

Issue/Introduction

Enabling health check monitoring in Veritas Cluster Server agent for Oracle with SFHA 6.0.5