How to enable secondary monitoring for VERITAS Cluster Server (VCS) and the Enterprise Agent for Oracle.
Secondary monitoring allows VCS to actually enter the database and verify that the Oracle instance is active; this provides added assurance that the database is operating correctly. The following information was taken from /opt/VRTSvcs/bin/Oracle/SqlTest.pl":
The following test updates a row "tstamp" with the latest value of the Oracle internal function SYSDATE. A prerequisite for this test is that a user/password/table has been created before enabling the script by defining the attributes User/Pword/Table/MonScript for the Oracle resource.
This task can be accomplished by the following SQL statements as DB-admin:
SQLDBA|SVRMGR> connect internal
SQLDBA|SVRMGR> create user <User>
2> identified by <Pword>
3> default tablespace USERS
4> temporary tablespace USERS
5> quota 100K on USERS;
USERS is the tablespace name present at all standard Oracle installations. It might be replaced by any other tablespace for the specific installation.
(To get a list of valid tablespaces use: select * from sys.dba_tablespaces;)
SQLDBA|SVRMGR> grant create session to <User>;
SQLDBA|SVRMGR> create table <User>.<Table> ( tstamp date );
SQLDBA|SVRMGR> insert into <User>.<Table> ( tstamp ) values ( SYSDATE );
The name of the row "tstamp" should match the one of the update statement below!