Detail monitoring for an Oracle resource verifies whether a database is ready for transactions by performing an update transaction against a table within the database. The update action is taken by the two scripts, SqlTest.pl and SimpleTest.pl, provided with the Veritas High Availability Agent for Oracle. The scripts are available under the directory /opt/VRTSagents/ha/bin/Oracle/. Both scripts update the timestamp to monitor the database.
To set up detail monitoring for Oracle 1 Make the VCS configuration writable: haconf -makerw 2 Freeze the service group to avoid automated actions by VCS caused by an incomplete reconfiguration: hagrp -freeze service_group 3 Log on as an Oracle user. su - 4 Set the environment variables for ORACLE_HOME and ORACLE_SID. export ORACLE_HOME= export ORACLE_SID= 5 Start the svrmgrl or sqlplus utility to set up a database table: $ORACLE_HOME/bin/svrmgrl or $ORACLE_HOME/bin/sqlplus /nolog 6 As the database administrator, issue the following statements at thesvrmgrl or sqlplus prompt to create the test table: connect / as sysdba create user identified by default tablespace USERS temporary tablespace TEMP quota 100K on USERS; grant create session to ; create table .
( tstamp date ); insert into .
(tstamp) values (SYSDATE); 7 To test the database table for use, do the following: disconnect connect / update .
set ( tstamp ) = SYSDATE; select TO_CHAR(tstamp, ’MON DD, YYYY HH:MI:SS AM’) from .
; exit 8 Enable the detail monitoring for the Oracle resource using the following VCS commands: hares -modify OracleResource User User hares -modify OracleResource Pword Pword hares -modify OracleResource Table Table hares -modify OracleResource MonScript. "./bin/Oracle/SqlTest.pl" hares -modify OracleResource DetailMonitor 1 haconf -dump -makero hagrp -unfreeze service_group
Enabling and disabling detail monitoring for Oracle To enable detail monitoring ◆ Set the DetailMonitor attribute to 1. hares -modify OracleResource DetailMonitor 1 To disable detail monitoring ◆ Set the DetailMonitor attribute to 0. hares -modify OracleResource DetailMonitor 0