Oracle 11g RAC中,发现oc4j以及gsd服务都处于offline状态,这是Oracle 11g RAC默认情形。即便如此,并不影响数据库的使用,因为 oc4j 是用于WLM 的一个资源, WLM在 11.2.0.2 才可用。GSD则是用于支持dbca,srvctl,oem等的交互工具。本文描述将这两个服务切换到online。
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
WLM在 11.2.0.2 才可用,如果是11.2.0.1以上版本则oc4j是默认开启的。
[grid@HE1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE he1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE he1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE he1
ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE he1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE he1
ora.eons ora.eons.type 0/3 0/ ONLINE ONLINE he1
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE he1
ora....E1.lsnr application 0/5 0/0 ONLINE ONLINE he1
ora.he1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.he1.ons application 0/3 0/0 ONLINE ONLINE he1
ora.he1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE he1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE he2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE he2
ora.he2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.he2.ons application 0/3 0/0 ONLINE ONLINE he2
ora.he2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE he2
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE he1
ora.oc4j ora.oc4j.type 0/5 0/0 OFFLINE OFFLINE
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE he1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE he1
ora.sobey.db ora....se.type 0/2 0/1 ONLINE ONLINE he1
[root@HE1 db_1]# su - grid
[grid@HE1 ~]$ crs_stat -t |grep OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.he1.gsd application OFFLINE OFFLINE
ora.he2.gsd application OFFLINE OFFLINE
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
[grid@HE1 ~]$ srvctl enable oc4j
[grid@HE1 ~]$ srvctl start oc4j
[grid@HE1 ~]$ crs_stat -t |grep OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.he1.gsd application OFFLINE OFFLINE
ora.he2.gsd application OFFLINE OFFLINE
[grid@HE1 ~]$ srvctl enable nodeapps
PRKO-2415 : VIP is already enabled on node(s): he1,he2
PRKO-2416 : Network resource is already enabled.
PRKO-2417 : ONS is already enabled on node(s): he1,he2
PRKO-2418 : eONS is already enabled on node(s): he1,he2
[grid@HE1 ~]$ srvctl start nodeapps
PRKO-2421 : Network resource is already started on node(s): he1,he2
PRKO-2420 : VIP is already started on node(s): he1,he2
PRKO-2420 : VIP is already started on node(s): he1,he2
PRKO-2422 : ONS is already started on node(s): he1,he2
PRKO-2423 : eONS is already started on node(s): he1,he2
[grid@HE1 ~]$ crs_stat -t |grep OFFLINE
[grid@HE1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE he1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE he1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE he1
ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE he1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE he1
ora.eons ora.eons.type 0/3 0/ ONLINE ONLINE he1
ora.gsd ora.gsd.type 0/5 0/ ONLINE ONLINE he1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE he1
ora....E1.lsnr application 0/5 0/0 ONLINE ONLINE he1
ora.he1.gsd application 0/5 0/0 ONLINE ONLINE he1
ora.he1.ons application 0/3 0/0 ONLINE ONLINE he1
ora.he1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE he1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE he2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE he2
ora.he2.gsd application 0/5 0/0 ONLINE ONLINE he2
ora.he2.ons application 0/3 0/0 ONLINE ONLINE he2
ora.he2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE he2
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE he1
ora.oc4j ora.oc4j.type 0/5 0/0 ONLINE ONLINE he2
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE he1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE he1
ora.sobey.db ora....se.type 0/2 0/1 ONLINE ONLINE he1