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
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/,如需转载,请注明出处,否则将追究法律责任。
上一篇:
开放式存储
下一篇:
[基础]数据文件中记录的组织
请登录后发表评论
登录
全部评论
<%=items[i].createtime%>
<%=items[i].content%>
<%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%}%> <%if(items[i].items.total > 5) { %>
<%}%> <%}%>
<%=items[i].items.items[j].createtime%>
<%=items[i].items.items[j].username%> 回复 <%=items[i].items.items[j].tousername%>: <%=items[i].items.items[j].content%>
还有<%=items[i].items.total-5%>条评论
) data-count=1 data-flag=true>点击查看
<%}%>
转载于:http://blog.itpub.net/58054/viewspace-621798/
本文介绍如何通过更新交易的方式验证Oracle数据库是否准备好进行交易,并详细说明了使用SqlTest.pl和SimpleTest.pl脚本设置Oracle资源详细监控的过程。


2949






