![](https://csdnimg.cn/release/download_crawler_static/86034843/bg3.jpg)
2、启动与关闭集群服务资源
2.1 crs_stop与crs_start命令
通过crs_stop可以方便的关闭某个服务资源,例如:
[oracle@node-rac1 admin]$ crs_stop ora.node-rac1.LISTENER_NODE-RAC1.lsnr
Attempting to stop `ora.node-rac1.LISTENER_NODE-RAC1.lsnr` on member `node-rac1`
Stop of `ora.node-rac1.LISTENER_NODE-RAC1.lsnr` on member `node-rac1` succeeded.
此时,查看node-rac1节点的LISTENER服务状态:
[oracle@node-rac1 ~]$ crs_stat -t|grep lsnr
ora....C1.lsnr application OFFLINE OFFLINE
ora....C2.lsnr application ONLINE ONLINE node-rac2
从输出可知,node-rac1节点的LISTENER服务已经处于OFFLINE状态了。
接着启动node-rac1节点的LISTENER服务:
[oracle@node-rac1 ~]$crs_start ora.node-rac1.LISTENER_NODE-RAC1.lsnr
Attempting to start `ora.node-rac1.LISTENER_NODE-RAC1.lsnr` on member `node-rac1`
Start of `ora.node-rac1.LISTENER_NODE-RAC1.lsnr` on member `node-rac1` succeeded.
其实RAC数据库的监听还可以通过如下方式启动和关闭:
[oracle@node-rac1 ~]$lsnrctl start LISTENER_NODE-RAC1
[oracle@node-rac1 ~]$lsnrctl stop LISTENER_NODE-RAC1
有时候,可能需要将集群资源全部关闭,可以通过如下命令完成:
[oracle@node-rac1 ~]$ crs_stop -all
也通过一个命令将集群所有资源全部启动,操作如下:
[oracle@node-rac2 ~]$ crs_start -all
Oracle CRS的管理与维护