Thinking Out Loud

November 3, 2016

Oracle 12c CRS-4995: The command ‘Modify resource’ is invalid in crsctl.

Filed under: 12c,oracle — mdinh @ 2:23 am

So there I was playing with 12c Oracle restart and ran into
CRS-4995: The command ‘Modify resource’ is invalid in crsctl. Use srvctl for this command.

For 12c, this expected as crsctl shouldn’t be used to modify ora.* resource.

Couldn’t figure out how to modify resource using svrctl.

However, I did learn about -unsupported for crsctl.

hawk:(SYS@hawk):PRIMARY> show parameter db%name

NAME                                 TYPE                           VALUE
------------------------------------ ------------------------------ ------------------------------
db_file_name_convert                 string
db_name                              string                         hawk
db_unique_name                       string                         sgn_hawk
pdb_file_name_convert                string
hawk:(SYS@hawk):PRIMARY>

oracle@arrow1:hawk:/home/oracle
$ echo $ORACLE_SID;echo $ORACLE_HOME
hawk
/u01/app/oracle/product/12.1.0.2/db_1

oracle@arrow1:hawk:/home/oracle
$ srvctl add database -db sgn_hawk -o $ORACLE_HOME -p $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora -startoption open -stopoption immediate -dbname hawk

++++++++++

oracle@arrow1:hawk:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$ echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0.2/db_1

oracle@arrow1:hawk:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$ cat listener.ora
listener=(description=(address=(protocol=tcp)(host=)(port=1521)
LISTENER_12C =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1551))
      (ADDRESS=(PROTOCOL=tcp)(HOST=arrow1.localdomain)(PORT=1551)(SEND_BUF_SIZE=32767)(RECV_BUF_SIZE=32767))
    )
  )

SID_LIST_LISTENER_12C =
  (SID_LIST =
    (SID_DESC =
      (SDU=32767)
      (GLOBAL_DBNAME = sgn_hawk_DGMGRL)
      (ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1)
      (SID_NAME = hawk)
    )
    (SID_DESC =
      (SDU=32767)
      (GLOBAL_DBNAME = test2)
      (ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1)
      (SID_NAME = test2)
    )
  )

USE_SID_AS_SERVICE_LISTENER_12C = ON
INBOUND_CONNECT_TIMEOUT_LISTENER_12C = 120
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_12C = OFF
DIAG_ADR_ENABLED_LISTENER_12C = OFF
LOGGING_LISTENER_12C = OFF
TRACE_LEVEL_LISTENER_12C = OFF
SAVE_CONFIG_ON_STOP_LISTENER_12C = TRUE

oracle@arrow1:hawk:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$ srvctl add listener -l LISTENER_12C -p TCP:1551 -o $ORACLE_HOME
oracle@arrow1:hawk:/u01/app/oracle/product/12.1.0.2/db_1/network/admin
$

++++++++++
oracle@arrow1:grid:/home/oracle
$ srvctl config database
sgn_hawk

oracle@arrow1:grid:/home/oracle
$ srvctl config listener
Name: LISTENER_12C
Type: Database Listener
Home: /u01/app/oracle/product/12.1.0.2/db_1
End points: TCP:1551
Listener is enabled.

+++++++++

oracle@arrow1:grid:/home/oracle
$ crsctl stat res -t -w "TYPE = ora.listener.type"|grep lsnr
ora.LISTENER_12C.lsnr

oracle@arrow1:grid:/home/oracle
$ crsctl stat res -t -w "TYPE = ora.database.type"|grep db
ora.sgn_hawk.db

oracle@arrow1:grid:/home/oracle
$ crsctl stat res ora.sgn_hawk.db -p | grep AUTO_START
AUTO_START=restore

++++++++++

Why database not startup automatic 11gR2 Grid Infrastructure?
http://surachartopun.com/2011/04/why-database-not-startup-automatic.html

AUTO_START
- always: 
Restarts the resource when the server restarts regardless of the state of the resource when the server stopped.

- restore: 
Restores the resource to the same state that it was in when the server stopped. 
Oracle Clusterware attempts to restart the resource if the value of TARGET was ONLINE before the server stopped.

- never: 
Oracle Clusterware never restarts the resource regardless of the state of the resource when the server stopped.

++++++++++

oracle@arrow1:grid:/home/oracle
$ crsctl modify resource ora.sgn_hawk.db -attr AUTO_START=always
CRS-4995:  The command 'Modify  resource' is invalid in crsctl. Use srvctl for this command.

++++++++++

crsctl modify ora.* resource fails with CRS-4995 in 12.1.0.2 and above (Doc ID 1918102.1)
Alternative Procedure To Install and Configure ASM 12.1.0.2.0 On Unix/Linux Configurations (Standalone) (Doc ID 1954213.1)

oracle@arrow1:grid:/home/oracle
$ crsctl modify resource ora.sgn_hawk.db -attr AUTO_START=always -unsupported

oracle@arrow1:grid:/home/oracle
$ crsctl stat res ora.sgn_hawk.db -p | grep AUTO_START
AUTO_START=always
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: