在12.1.0.2之后,如果使用crsctl进行ora resource的修改,启动,关闭,会遭遇CRS-4995的错误。要求你使用srvctl命名来进行操作
[oracle@12102-rac1 ~]$ crsctl stop resource ora.cdbrac.db
CRS-4995: The command 'Stop resource' is invalid in crsctl. Use srvctl for this command.
[oracle@12102-rac1 ~]$
参考下面3个文档:
Online Document:Clusterware Administration and Deployment Guide:
Note:
Do not use CRSCTL commands on Oracle entities (such as resources, resource types, and server pools) that have names beginning with ora unless you are directed to do so by My Oracle Support. The Server Control utility (SRVCTL) is the correct utility to use on Oracle entities.
crsctl modify ora.* resource fails with CRS-4995 in 12.1.0.2 and above (Doc ID 1918102.1)
PRKF-1085 : Command 'start' is not supported for object 'network' (Doc ID 1966448.1)
悲催的是,除非自建的资源,我们几乎所有的资源都是ora开头的:
[oracle@12102-rac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE 12102-rac1 STABLE
ora.DG_DATA.dg
ONLINE ONLINE 12102-rac1 STABLE
ora.LISTENER.lsnr
ONLINE OFFLINE 12102-rac1 STABLE
ora.net1.network
ONLINE ONLINE 12102-rac1 STABLE
ora.ons
ONLINE ONLINE 12102-rac1 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.12102-rac1.vip
1 ONLINE OFFLINE STABLE
ora.12102-rac2.vip
1 ONLINE OFFLINE STABLE
ora.12102-rac3.vip
1 ONLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE OFFLINE STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE OFFLINE STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE OFFLINE STABLE
ora.MGMTLSNR
1 ONLINE ONLINE 12102-rac1 169.254.161.44 192.1
68.57.34,STABLE
ora.asm
1 ONLINE ONLINE 12102-rac1 STABLE
2 ONLINE OFFLINE STABLE
3 ONLINE OFFLINE STABLE
ora.cdbrac.db
1 ONLINE OFFLINE STABLE
2 ONLINE ONLINE 12102-rac1 Open,STABLE
3 ONLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE 12102-rac1 STABLE
ora.gns
1 ONLINE ONLINE 12102-rac1 STABLE
ora.gns.vip
1 ONLINE ONLINE 12102-rac1 STABLE
ora.mgmtdb
1 ONLINE OFFLINE Instance Shutdown,ST
ABLE
ora.oc4j
1 ONLINE ONLINE 12102-rac1 STABLE
ora.scan1.vip
1 ONLINE OFFLINE 12102-rac1 STARTING
ora.scan2.vip
1 ONLINE OFFLINE STABLE
ora.scan3.vip
1 ONLINE OFFLINE STABLE
--------------------------------------------------------------------------------
[oracle@12102-rac1 ~]$
也就是说,几乎所有的资源,我们都不能用crsctl来做修改了。如过去这样改AUTO_START的操作:
[oracle@12102-rac1 ~]$ crsctl stat res ora.cdbrac.db -p |grep AUTO
AUTO_START=restore
MANAGEMENT_POLICY=AUTOMATIC
[oracle@12102-rac1 ~]$
crsctl modify res ora.cdbrac.db -attr "AUTO_START=always"
这些操作都不能像之前版本一样操作了。
解决方法:加-unsupported参数。(但建议还是按照官方文档使用srvctl操作)
先用eval参数看看模拟执行的效果:
[oracle@12102-rac1 ~]$ crsctl eval stop res ora.cdbrac.db -unsupported
Stage Group 1:
--------------------------------------------------------------------------------
Stage Number Required Action
--------------------------------------------------------------------------------
1 Y Resource 'ora.cdbrac.db' (2/1) will be in state
[OFFLINE]
--------------------------------------------------------------------------------
[oracle@12102-rac1 ~]$ ##然后实际操作:
[oracle@12102-rac1 ~]$ crsctl stop resource ora.cdbrac.db -unsupported
CRS-2673: Attempting to stop 'ora.cdbrac.db' on '12102-rac1'
CRS-2677: Stop of 'ora.cdbrac.db' on '12102-rac1' succeeded
[oracle@12102-rac1 ~]$
顺便多说两句12c中eval的参数:
在12c中,你可以eval模拟敲命令的后果,也可以predict资源失败的后果:
(1)crsctl eval=srvctl -eval
(2)crsctl eval fail=srvctl predict
(1)
[oracle@12102-rac1 ~]$ crsctl eval stop res ora.cdbrac.db -unsupported
Stage Group 1:
--------------------------------------------------------------------------------
Stage Number Required Action
--------------------------------------------------------------------------------
1 Y Resource 'ora.cdbrac.db' (2/1) will be in state
[OFFLINE]
--------------------------------------------------------------------------------
[oracle@12102-rac1 ~]$
[oracle@12102-rac1 ~]$ srvctl stop database -db cdbrac -eval
Database cdbrac will be stopped on node 12102-rac1
(2)
[oracle@12102-rac1 ~]$ crsctl eval fail res ora.cdbrac.db -unsupported
Stage Group 1:
--------------------------------------------------------------------------------
Stage Number Required Action
--------------------------------------------------------------------------------
1 Y Resource 'ora.cdbrac.db' (2/1) will be in state
[ONLINE|INTERMEDIATE] on server [12102-rac1]
--------------------------------------------------------------------------------
[oracle@12102-rac1 ~]$ srvctl predict database -db cdbrac
Database cdbrac will be stopped on node 12102-rac1
[oracle@12102-rac1 ~]$