crs_stat无法看到实例的解决方法

数据库有一个主节点,一个备节点,主备节点都是两台机器组成的rac,数据通过存储来同步。在异地还有一个单节点的灾备设备。主节点配置完成后,数 据库停下来,关掉存储,是备节点的存储和设备都处在online 状态。配置完asm,发现数据库实例通过sqlplus能够启动但是不能使用srvctl启动,而且不能通过crs_stat看到实例的信息。
[orac10@db02 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE db01
ora....01.lsnr application ONLINE ONLINE db01
ora.db01.gsd application ONLINE ONLINE db01
ora.db01.ons application ONLINE ONLINE db01
ora.db01.vip application ONLINE ONLINE db01
ora....SM2.asm application ONLINE ONLINE db02
ora....02.lsnr application ONLINE ONLINE db02
ora.db02.gsd application ONLINE ONLINE db02
ora.db02.ons application ONLINE ONLINE db02
ora.db02.vip application ONLINE ONLINE db02
[orac10@db02 ~]$ srvctl status instance -d orcl -i orcl2
PRKO-2007 : Invalid instance name: orcl2
[orac10@db02 ~]$ srvctl status instance -d orcl -i orcl1
PRKO-2007 : Invalid instance name: orcl1

这个时候,需要使用sqlplus停掉所有的实例,如何使用srvctl add来添加实例。
[orac10@db02 ~]$ srvctl add database -d orcl -o /app/oracle/product/10/
crs_1/ db_1/
[orac10@db02 ~]$ srvctl add database -d orcl -o /app/oracle/product/10/db_1
[orac10@db02 ~]$ srvctl add instance -d orcl -i orcl1 -n db01
[orac10@db02 ~]$ srvctl add instance -d orcl -i orcl2 -n db02
[orac10@db02 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE db01
ora....01.lsnr application ONLINE ONLINE db01
ora.db01.gsd application ONLINE ONLINE db01
ora.db01.ons application ONLINE ONLINE db01
ora.db01.vip application ONLINE ONLINE db01
ora....SM2.asm application ONLINE ONLINE db02
ora....02.lsnr application ONLINE ONLINE db02
ora.db02.gsd application ONLINE ONLINE db02
ora.db02.ons application ONLINE ONLINE db02
ora.db02.vip application ONLINE ONLINE db02
ora.orcl.db application OFFLINE OFFLINE
ora....l1.inst application OFFLINE OFFLINE
ora....l2.inst application OFFLINE OFFLINE

[orac10@db02 ~]$ srvctl start instance -d orcl -i orcl2
[orac10@db02 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE db01
ora....01.lsnr application ONLINE ONLINE db01
ora.db01.gsd application ONLINE ONLINE db01
ora.db01.ons application ONLINE ONLINE db01
ora.db01.vip application ONLINE ONLINE db01
ora....SM2.asm application ONLINE ONLINE db02
ora....02.lsnr application ONLINE ONLINE db02
ora.db02.gsd application ONLINE ONLINE db02
ora.db02.ons application ONLINE ONLINE db02
ora.db02.vip application ONLINE ONLINE db02
ora.orcl.db application ONLINE ONLINE db01
ora....l1.inst application OFFLINE OFFLINE
ora....l2.inst application ONLINE ONLINE db02
[orac10@db02 ~]$ srvctl start instance -d orcl -i orcl1
[orac10@db02 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE db01
ora....01.lsnr application ONLINE ONLINE db01
ora.db01.gsd application ONLINE ONLINE db01
ora.db01.ons application ONLINE ONLINE db01
ora.db01.vip application ONLINE ONLINE db01
ora....SM2.asm application ONLINE ONLINE db02
ora....02.lsnr application ONLINE ONLINE db02
ora.db02.gsd application ONLINE ONLINE db02
ora.db02.ons application ONLINE ONLINE db02
ora.db02.vip application ONLINE ONLINE db02
ora.orcl.db application ONLINE ONLINE db01
ora....l1.inst application ONLINE ONLINE db01
ora....l2.inst application ONLINE ONLINE db02
[orac10@db02 ~]$

你可能感兴趣的:(oracle)