有时候,我们会碰到客户提出需求,为rac数据库下的某个实例应用停掉,来做机器的正常维护,比如换HBA卡等
这个时候就需要我们DBA介入了,而且只关闭某个实例,而不影响到另外的实例和整个数据库的正常运行
下面就具体步骤列出来:假设我们要停RAC2实例
1.用crs_stat显示资源的全部状态
[oracle@RAC2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
ora.racdb.db application ONLINE ONLINE rac2
ora....b1.inst application ONLINE ONLINE rac1
ora....b2.inst application ONLINE ONLINE rac2
2.用srvctl停监听
[oracle@RAC2 ~]$ srvctl stop listener -n rac2
[oracle@RAC2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE
这个时候就需要我们DBA介入了,而且只关闭某个实例,而不影响到另外的实例和整个数据库的正常运行
Name
------------------------------------------------------------
ora....SM1.asm application
ora....C1.lsnr application
ora.rac1.gsd
ora.rac1.ons
ora.rac1.vip
ora....SM2.asm application
ora....C2.lsnr application
ora.rac2.gsd
ora.rac2.ons
ora.rac2.vip
ora.racdb.db
ora....b1.inst application
ora....b2.inst application
2.用srvctl停监听
[oracle@RAC2 ~]$ srvctl stop listener -n rac2
[oracle@RAC2 ~]$ crs_stat -t
Name
------------------------------------------------------------
ora....SM1.asm application
ora....C1.lsnr application
ora.rac1.gsd
ora.rac1.ons
ora.rac1.vip
ora....SM2.asm application