Wednesday, June 2, 2021

Modify START_DEPENDENCIES in 19c Clusterware

While starting database if you get the below error, then you must check the resource that is missing in the START_DEPENDENCIES attribute of the Clusterware and correct the value of this attribute. 
Let's see how to troubleshoot this problem and fix it.

ERROR when starting the database Instance: 

[oracle@ed-olraclin1:TESTCDB1:~]$ srvctl start database -d TESTCDB
PRCR-1079 : Failed to start resource ora.testcdb.db
CRS-2640: Required resource 'uniform' is missing.

SQL> startup nomount;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORA-39511: Start of CRS resource for instance '222' failed with error:[CRS-2640: Required resource 'uniform' is missing.
CRS-0222: Resource 'ora.testcdb.db' has dependency error.
clsr_start_resource:260 status:222
clsrapi_start_db:start_asmdbs status:222
]

Get Full list of RESOURCE Attributes and their values

[grid@ed-olraclin1:+ASM1:~]$ crsctl status resource ora.testcdb.db -f

START_DEPENDENCIES=hard(uniform:,global:uniform:ora.TEST.dg) pullup(,global:ora.TEST.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns)

In the above Attribute value, the uniform:, and a comma , that is highlighted are causing the database not to start, so we will correct this attribute value.

Correct the START_DEPENDENCIES Attribute value

[oracle@ed-olraclin1:TESTCDB1:~]$ /u01/19.0/grid/bin/crsctl modify resource ora.testcdb.db -attr "START_DEPENDENCIES='hard(global:uniform:ora.TEST.dg) pullup(global:ora.TEST.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns)'" -unsupported

Note the -unsupported option used to modify this Attribute value while this option is not required to modify any other Attribute's value. Moreover this option is not mentioned in the Syntax as shown below,

[grid@ed-olraclin1:+ASM1:~]$ crsctl modify resource -help
Usage:
  crsctl modify resource <resName> -attr "<specification>[,...]" [-f] [-delete] [-i] [-group <resourceGroupName>] [-env "env1=val1,env2=val2,..."]
     <specification>:   {<attrName>=<value> | <attrName>@<scope>=<value>}
        <scope>:   {@SERVERNAME(<server>)[@DEGREEID(<did>)] |
                       @CARDINALITYID(<cid>)[@DEGREEID(<did>)] }
where
     resName            Modify named resource
     attrName           Attribute name
     value              Attribute value
     server             Server name
     cid                Resource cardinality ID
     did                Resource degree ID
     -f                 Force option
     -delete            Delete named attribute
     -i                 Fail if request cannot be processed immediately
     -env               Override environment values for this command
     resourceGroupName  Resource group name

Now you will be able to start the database without any problem,

srvctl start database -d TESTCDB

Theory about START_DEPENDENCIES Attribute and it's value

Cannot determine the cause the value of START_DEPENDENCIES got changed in first place. It gets modified only when someone attempt to change the values.

START_DEPENDENCIES
Specifies a set of relationships that Oracle Clusterware considers when starting a resource. You can specify a space-delimited list of dependencies on several resources and resource types on which a particular resource can depend.

SYNTAX: START_DEPENDENCIES=dependency(resource_set) [dependency(resource_set)] [...]

In the above syntax, the variables are defined, as follows:

•dependency: Possible values are attraction, dispersion, exclusion, hard, pullup, and weak. You can specify each dependency only once, except for pullup, which you can specify multiple times.

•resource_set: A comma-delimited list of resource entities—either individual resources or resource types—enclosed in parentheses (), in the form of res1[, res2[, ...]], upon which the resource you are configuring depends.

Below are 2 dependency explained, 

pullup[:always]([intermediate:][global:]{resource_name | type:resource_type})—When you specify the pullup start dependency for a resource, then this resource starts because of named resources starting.

Use the always modifier for pullup so that Oracle Clusterware starts this resource despite the value of its TARGET attribute, whether that value is ONLINE or OFFLINE. Otherwise, if you do not specify the always modifier, then Oracle Clusterware starts this resource only if the value of the TARGET attribute is ONLINE for this resource.

hard([intermediate:][global:][uniform:]{resource_name | type:resource_type}) - Specify a hard start dependency for a resource when you want the resource to start only when a particular resource or resource of a particular type starts.

weak([concurrent:][global:][uniform:]{resource_name | type:resource_type})—Specify a weak start dependency for a resource when you want that resource to start despite whether named resources are running, or not. An attempt to start this resource also attempts to start any resources on which this resource depends if they are not running.

For any technical queries you can email me on samiappsdba@gmail.com