oracle11gRAC的oc4j和gsd服务都处于offline状态
# 环境:
操作系统
$ uname -a
Linux jinhu-db02 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 6.9 (Final)
数据库
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Oracle 11g RAC中,发现oc4j以及gsd服务都处于offline状态,这是Oracle 11g RAC默认情形。
即便如此,并不影响数据库的使用,因为 oc4j 是用于WLM 的一个资源, WLM在 11.2.0.2 才可用。
GSD则是用于支持dbca,srvctl,oem等的交互工具,为了向后兼容9i而保留。
本文描述将这两个服务切换到online。
1、环境
[grid@jinhu-db02 ~]$ cat /etc/issue
CentOS release 6.9 (Final)
Kernel \r on an \m
[grid@jinhu-db02 ~]$ uname -a
Linux jinhu-db02 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
2、oc4j与所有的gsd处于offline
oc4j与所有的gsd处于offline
[grid@jinhu-db02 ~]$ crs_stat -t | grep OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....b01.gsd application OFFLINE OFFLINE
ora....b02.gsd application OFFLINE OFFLINE
###如果没有9i的RAC数据库,不用启用GSD
Enable GSD in 11.2
srvctl enable nodeapps -g
srvctl start nodeapps
Disable GSD (11.2)
You may want to disable GSD after you upgraded all your Oracle9i RAC databases.
srvctl stop nodeapps
srvctl disable nodeapps -g
srvctl start nodeapps
经验证,这里的disable的一系列操作,可以让ora.gsd的target本来是ONLINE变成OFFLINE.
oracle 11g的ora.gsd默认是OFFLINE
4、启动gsd服务
#查看节点linux1上所有的资源状态,可以看到输出的信息表明GSD也被disable了
[grid@jinhu-db01 ~]$ srvctl status nodeapps -n jinhu-db01
VIP jinhu-db01-vip is enabled
VIP jinhu-db01-vip is running on node: jinhu-db01
Network is enabled
Network is running on node: jinhu-db01
GSD is disabled
GSD is not running on node: jinhu-db01
ONS is enabled
ONS daemon is running on node: jinhu-db01
#下面查看节点linux2上所有的资源状态,也可以看到输出的信息表明GSD也被disable了
[grid@jinhu-db02 ~]$ srvctl status nodeapps -n jinhu-db02
VIP jinhu-db02-vip is enabled
VIP jinhu-db02-vip is running on node: jinhu-db02
Network is enabled
Network is running on node: jinhu-db02
GSD is disabled
GSD is not running on node: jinhu-db02
ONS is enabled
ONS daemon is running on node: jinhu-db02
#将所有的服务置于enable状态
[grid@jinhu-db02 ~]$ srvctl enable nodeapps
PRKO-2415 : VIP is already enabled on node(s): jinhu-db01,jinhu-db02
PRKO-2416 : Network resource is already enabled.
PRKO-2417 : ONS is already enabled on node(s): jinhu-db01,jinhu-db02
#再次查看GSD的状态已经变成enable了
[grid@jinhu-db02 ~]$ srvctl status nodeapps
VIP jinhu-db01-vip is enabled
VIP jinhu-db01-vip is running on node: jinhu-db01
VIP jinhu-db02-vip is enabled
VIP jinhu-db02-vip is running on node: jinhu-db02
Network is enabled
Network is running on node: jinhu-db01
Network is running on node: jinhu-db02
GSD is enabled
GSD is not running on node: jinhu-db01
GSD is not running on node: jinhu-db02
ONS is enabled
ONS daemon is running on node: jinhu-db01
ONS daemon is running on node: jinhu-db02
[grid@jinhu-db02 ~]$ crs_stat -t | grep OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....b01.gsd application OFFLINE OFFLINE
ora....b02.gsd application OFFLINE OFFLINE
#启动GSD服务
[grid@jinhu-db02 ~]$ srvctl start nodeapps
PRCR-1079 : Failed to start resource ora.gsd
CRS-5016: Process "/u01/app/11.2.0/grid/bin/gsdctl" spawned by agent "/u01/app/11.2.0/grid/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/u01/app/11.2.0/grid/log/jinhu-db01/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-5016: Process "/u01/app/11.2.0/grid/bin/gsdctl" spawned by agent "/u01/app/11.2.0/grid/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/u01/app/11.2.0/grid/log/jinhu-db02/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-2674: Start of 'ora.gsd' on 'jinhu-db01' failed
CRS-2674: Start of 'ora.gsd' on 'jinhu-db02' failed
PRKO-2421 : Network resource is already started on node(s): jinhu-db01,jinhu-db02
PRKO-2420 : VIP is already started on node(s): jinhu-db01
PRKO-2420 : VIP is already started on node(s): jinhu-db02
PRKO-2422 : ONS is already started on node(s): jinhu-db01,jinhu-db02
#验证GSD服务
[grid@jinhu-db02 ~]$ crs_stat -t | grep OFFLINE
ora.gsd ora.gsd.type ONLINE OFFLINE
ora....b01.gsd application ONLINE OFFLINE
ora....b02.gsd application ONLINE OFFLINE
[grid@jinhu-db02 ~]$ crs_stat -t | grep gsd
ora.gsd ora.gsd.type ONLINE OFFLINE
ora....b01.gsd application ONLINE OFFLINE
ora....b02.gsd application ONLINE OFFLINE
#Author : Robinson
5、关于GSD
The Global Services Daemon (GSD) runs on each node with one GSD process per node.
The GSD coordinates with the cluster manager to receive requests from clients such as the DBCA, EM,
and the SRVCTL utility to execute administrative job tasks such as instance startup or shutdown.
The GSD is not an Oracle instance background process and is therefore not started with the Oracle instance.
GSD与rac的管理工具dbca srvctl oem进行交互,用来完成实例的启动关闭等管理任务。
为了保证这些管理工具运行正常必须在所有的节点上先启动 gsd。
一个GSD进程支持在一个节点的多个rac.gsd进程,位于$ORACLE_HOME/bin目录下。
其log文件为$oracle_home /srvm/log/gsdaemon.log。
例如:
假设使用oem工具来启动一个实例,oem把该任务传递给相应的智能引擎,该智能引擎生成一个包含SRVCTL命令的脚本文件,
GSD进程读取该脚本文件并且执行该脚本,最后GSD把执行结果返回给智能引擎,近而智能引擎返回给OEM。
又例如假设使用srvctl工具关闭所有的实例,GSD进程接受来自SRVCTL工具发出的请求,并
在本地节点上执行该请求,然后把执行结果返回给SRVCTL会话。
!!The End!!