ccyyzh 2019-05-18
需要维修主机,上面是RAC的备节点。 变更内容为起停这个节点的数据库实例和crs集群。实际操作的时候很顺利,没什么问题:
一、关闭:
1 关闭实例
sqlplus / as sysdba
shutdown immediate
rac的实例也可以像单节点一样关闭,
另一种方式是srvctl stop instance -d racdb -i racdb2 -o immediate
2 关闭crs
crsctl stop crs
这个命令只会关闭当前节点的crs
实际操作时使用Oracle用户并在全路径下执行时报错,权限不足。
由于已有root用户,使用root用户关闭了集群。
二、启动
1 开启crs
默认情况下crs会随操作系统启动,实际变更操作时,等待大约十分钟后,crs和实例都正常启动。
若没有正常启动,或需要手动启动时,命令如下:
crsctl start crs
2 启动实例
sqlplus / as sysdba
startup
另一种方式是srvctl start instance -d racdb -i racdb2 -o immediate
查看cluster资源状态
[oracle@traracdb2 ~]$ /app/11.2.0/grid/bin/crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE traracdb1
ONLINE ONLINE traracdb2
ora.DATA.dg
ONLINE ONLINE traracdb1
ONLINE ONLINE traracdb2
ora.LISTENER.lsnr
ONLINE ONLINE traracdb1
ONLINE ONLINE traracdb2
ora.OCR.dg
ONLINE ONLINE traracdb1
ONLINE ONLINE traracdb2
ora.asm
ONLINE ONLINE traracdb1 Started
ONLINE ONLINE traracdb2 Started
ora.gsd
OFFLINE OFFLINE traracdb1
OFFLINE OFFLINE traracdb2
ora.net1.network
ONLINE ONLINE traracdb1
ONLINE ONLINE traracdb2
ora.ons
ONLINE ONLINE traracdb1
ONLINE ONLINE traracdb2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE traracdb1
ora.cvu
1 ONLINE ONLINE traracdb1
ora.oc4j
1 ONLINE ONLINE traracdb1
ora.scan1.vip
1 ONLINE ONLINE traracdb1
ora.racdb.db
1 ONLINE ONLINE traracdb1 Open
2 ONLINE ONLINE traracdb2 Open
ora.racdb.dg_rac.svc
1 ONLINE OFFLINE
ora.racdb.rac.svc
1 ONLINE ONLINE traracdb1
ora.traracdb1.vip
1 ONLINE ONLINE traracdb1
ora.traracdb2.vip
1 ONLINE ONLINE traracdb2