Monday, April 25, 2011

Why database not startup automatic 11gR2 Grid Infrastructure?

I have used Database on Grid Infrastructure for a Stand-Alone Server. I stopped database and then rebooted server for something. After rebooted... Database not startup automatic?
Why not automatic...? Um... Actually this isn't my point in this post (because: AUTO_START=restore)
I just learned, tested and shared. Learn to change attribute in resource -)

We can check attributes in resource by using "crsctl" command-line. This case, we just interested AUTO_START attribute.
$ crsctl status resource ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=OFFLINE
STATE=OFFLINE

$ crsctl status resource ora.orcl.db -p | grep AUTO_START
AUTO_START=restore
What did we see? Um....
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.
OK... AUTO_START attribute in ora.orcl.db resource has "restore" value, that mean... if resource was stopped before restart HAS or Server. we have to start it by ourselves.
$ crsctl start resource ora.orcl.db
CRS-2672: Attempting to start 'ora.orcl.db' on 'oratest'
CRS-2676: Start of 'ora.orcl.db' on 'oratest' succeeded

$ crsctl status resource ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on oratest
OK... Tested to change attribute (AUTO_START=always)
$ crsctl modify resource
Parse error:
Argument 'resource' is missing a value

Usage:
crsctl modify resource <resName> -attr "<specification>[,...]" [-f] [-delete] [-i]
<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

$ crsctl modify resource ora.orcl.db -attr AUTO_START=always

$ crsctl status resource ora.orcl.db -p | grep AUTO_START
AUTO_START=always
Learned??? Default AUTO_START value = "restore" in database resource... and changing attribute in resource -)

2 comments:

Anonymous said...

Thank you for sharing. Helpful.

Anonymous said...

Helpful