crs_register/crs_unregister 注册与移除RAC服务
在使用crs_register之前,可以使用crs_profile创建资源配置文件。缺省情况下,未指定配置文件的路径时,新创建的资源配置文件位于
crs_register命令主要是将资源注册到CRS。该方法通常结合crs_stat -p 或者crs_profile先创建配置文件。同时crs_register也具有更新CRS的功能。本文将描述crs_register以及crs_unregister的用法。
在使用crs_register之前,可以使用crs_profile创建资源配置文件。缺省情况下,,未指定配置文件的路径时,新创建的资源配置文件位于$ORA_CRS_HOME/crs/public 路径下,并且以.cap后缀结尾。有关crs_profile用法请参考:使用crs_profile管理RAC资源配置文件
1、crs_register与crs_unregister用法
oracle@bo2dbp:~> crs_register
Usage: crs_register resource_name [-dir directory_path] [...] [-u] [-f] [-q]
crs_register resource_name -update [option ...] [-o option,...] -q
oracle@bo2dbp:~> crs_unregister
Usage: crs_unregister resource_name [...] [-q]
2、查看本机当前运行的服务
oracle@bo2dbp:~> ./crs_stat.sh
Resource name Target State
-------------- ------ -----
ora.GOBO4.GOBO4A.inst ONLINE ONLINE on bo2dbp
ora.GOBO4.GOBO4B.inst ONLINE ONLINE on bo2dbs
ora.GOBO4.GOBO4_SRV.GOBO4A.srv ONLINE ONLINE on bo2dbp
ora.GOBO4.GOBO4_SRV.cs ONLINE ONLINE on bo2dbp
ora.GOBO4.db ONLINE ONLINE on bo2dbs
ora.bo2dbp.ASM1.asm ONLINE ONLINE on bo2dbp
ora.bo2dbp.LISTENER_BO2DBP.lsnr ONLINE ONLINE on bo2dbp
ora.bo2dbp.LISTENER_ORA10G_BO2DBP.lsnr ONLINE ONLINE on bo2dbp
ora.bo2dbp.gsd ONLINE ONLINE on bo2dbp
ora.bo2dbp.ons ONLINE ONLINE on bo2dbp
ora.bo2dbp.vip ONLINE ONLINE on bo2dbp
ora.bo2dbs.ASM2.asm ONLINE ONLINE on bo2dbs
ora.bo2dbs.LISTENER_BO2DBS.lsnr ONLINE ONLINE on bo2dbs
ora.bo2dbs.LISTENER_ORA10G_BO2DBS.lsnr ONLINE ONLINE on bo2dbs
ora.bo2dbs.gsd ONLINE ONLINE on bo2dbs
ora.bo2dbs.ons ONLINE ONLINE on bo2dbs
ora.bo2dbs.vip ONLINE ONLINE on bo2dbs
ora.ora10g.db ONLINE ONLINE on bo2dbs
ora.ora10g.hr_ora10g.cs ONLINE ONLINE on bo2dbp
ora.ora10g.hr_ora10g.ora10g1.srv ONLINE ONLINE on bo2dbp
ora.ora10g.ora10g1.inst ONLINE ONLINE on bo2dbp
ora.ora10g.ora10g2.inst ONLINE ONLINE on bo2dbs
3、使用crs_stat -p列出资源详细信息
#下面列出了service hr_ora10g的详细信息
#可以将下面的内容直接保存为配置文件(手工操作),等同于使用crs_profile
oracle@bo2dbp:~> crs_stat -p ora.ora10g.hr_ora10g.ora10g1.srv
NAME=ora.ora10g.hr_ora10g.ora10g1.srv
TYPE=application
ACTION_SCRIPT=/u01/Oracle/db/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=restore
CHECK_INTERVAL=0
DESCRIPTION=CRS application for Service Member
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=bo2dbp bo2dbs
OPTIONAL_RESOURCES=ora.ora10g.ora10g2.inst
PLACEMENT=restricted
REQUIRED_RESOURCES=
RESTART_ATTEMPTS=0
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=
上一篇: php-PHP如何关闭计划任务?