ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [VCS] Setting up detail monitoring for Oracle

[VCS] Setting up detail monitoring for Oracle

原创 Linux操作系统 作者:fancyboy2k 时间:2009-12-07 10:17:48 0 删除 编辑
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 the svrmgrl 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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/58054/viewspace-621798/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 开放式存储
请登录后发表评论 登录
全部评论

注册时间:2008-09-10

  • 博文量
    65
  • 访问量
    104675