ORACLE RAC 日常维护
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ORACLE RAC 日常维护
一、Oracle RAC状态查看启动关闭命令
1、rac状态检查:
application service状态应该都为online:
HDOADB1:> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....s1.inst application ONLINE ONLINE hdoadb1
ora....s2.inst application ONLINE ONLINE hdoadb2
ora.ams.db application ONLINE ONLINE hdoadb2
ora....B1.lsnr application ONLINE ONLINE hdoadb1
ora....db1.gsd application ONLINE ONLINE hdoadb1
ora....db1.ons application ONLINE ONLINE hdoadb1
ora....db1.vip application ONLINE ONLINE hdoadb1
ora....B2.lsnr application ONLINE ONLINE hdoadb2
ora....db2.gsd application ONLINE ONLINE hdoadb2
ora....db2.ons application ONLINE ONLINE hdoadb2
ora....db2.vip application ONLINE ONLINE hdoadb2
ora.orcl.db application ONLINE ONLINE hdoadb1
ora....l1.inst application ONLINE ONLINE hdoadb1
ora....l2.inst application ONLINE ONLINE hdoadb2
2、查看两台机器rac db状态:
$ srvctl status database –d orcl
$ srvctl status database –d ams
查看一台机器的实例的状态
$ srvctl status instance -d orcl -i orcl1
特定节点上节点应用程序的状态
社区论坛
$ srvctl status nodeapps -n linux1
VIP is running on node: linux1
GSD is running on node: linux1
Listener is running on node: linux1
ONS daemon is running on node: linux1
3、关闭整个rac db:
$ srvctl stop database –d orcl
$ srvctl stop database –d ams
$ srvctl stop nodeapps –n hdoadb1
$ srvctl stop nodeapps –n hdoadb2
用crs_stat命令来检查application service状态应该都为offline
HDOADB1: > crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....s1.inst application OFFLINE OFFLINE hdoadb1 ora....s2.inst application OFFLINE OFFLINE hdoadb2 ora.ams.db application OFFLINE OFFLINE hdoadb2 ora....B1.lsnr application OFFLINE OFFLINE hdoadb1 ora....db1.gsd application OFFLINE OFFLINE hdoadb1 ora....db1.ons application OFFLINE OFFLINE hdoadb1 ora....db1.vip application OFFLINE OFFLINE hdoadb1 ora....B2.lsnr application OFFLINE OFFLINE hdoadb2 ora....db2.gsd application OFFLINE OFFLINE hdoadb2 ora....db2.ons application OFFLINE OFFLINE hdoadb2 ora....db2.vip application OFFLINE OFFLINE hdoadb2 ora.orcl.db application OFFLINE OFFLINE hdoadb1 ora....l1.inst application OFFLINE OFFLINE hdoadb1 ora....l2.inst application OFFLINE OFFLINE hdoadb2
4、开启整个rac db:
正常情况下当机器启动时oracle rac会自动启动的。
手动启动过程如下:
$ srvctl start nodeapps –n hdoadb1
$ srvctl start nodeapps –n hdoadb2
$srvctl start database –d orcl
$ srvctl start database –d ams
5、只停一个节点的instance(node1)
$ srvctl stop instance –d orcl –I orcl1
$ srvctl stop instance –d ams –I ams1
6、Oracle Clusterware的关闭与启动: