[VCS] Setting up detail monitoring for Oracle

本文介绍如何通过更新交易的方式验证Oracle数据库是否准备好进行交易,并详细说明了使用SqlTest.pl和SimpleTest.pl脚本设置Oracle资源详细监控的过程。
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 . insert into . 7 To test the database table for use, do the following:
disconnect
connect /
update . 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博客 ” ,链接:http://blog.itpub.net/58054/viewspace-621798/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 开放式存储
user_pic_default.png
请登录后发表评论 登录
全部评论
<%=items[i].createtime%>

<%=items[i].content%>

<%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%=items[i].items.items[j].createtime%> 回复

<%=items[i].items.items[j].username%>   回复   <%=items[i].items.items[j].tousername%><%=items[i].items.items[j].content%>

<%}%> <%if(items[i].items.total > 5) { %>
还有<%=items[i].items.total-5%>条评论 ) data-count=1 data-flag=true>点击查看
<%}%>
<%}%> <%}%>

转载于:http://blog.itpub.net/58054/viewspace-621798/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值