Database Reference
In-Depth Information
RC=$?
;;
'stop')
$SWITCH_USER $ORACLE_HOME/bin/sqlplus / as sysdba <<EOF
shutdown
exit
EOF
RC=$?
;;
'check')
$PS -ef | grep -v grep | grep ora_smon_${ORACLE_SID} > /dev/null
RC=$?
;;
*)
echo "invalid command passed to ${0} - must be one of start, stop or check"
esac
# we are done-return the status code to the caller
if (( RC == 0 )) ; then
exit 0
else
# the actual error code from the command does not matter
exit 1
fi
Moving the script to the ACFS file system allows for easier maintenance, and do not forget to make it executable
for its owner.
Note
the script assumes that the oratab files on both cluster nodes are properly maintained, otherwise it will fail.
Armed with the script you can create the new resource. The command used for this purpose is crsctl add resource.
[oracle@rac12node1 scripts]$ /u01/app/12.1.0.1/grid/bin/crsctl add resource -h
Usage:
crsctl add resource <resName> -type <typeName> [[-file <filePath>] | [-attr
"<specification>[,...]"]] [-f] [-i]
<specification>: {<attrName>=<value> | <attrName>@<scope>=<value>}
<scope>: {@SERVERNAME(<server>)[@DEGREEID(<did>)] |
@CARDINALITYID(<cid>)[@DEGREEID(<did>)] }
where
resName Add named resource
typeName Resource type
filePath Attribute file
attrName Attribute name
value Attribute value
server Server name
cid Resource cardinality ID
did Resource degree ID
-f Force option
-i Fail if request cannot be processed immediately
 
Search WWH ::




Custom Search