Database Reference
In-Depth Information
This command allows you freedom in designing your resource profile; for the purpose of a cluster database,
however, it is sufficient to add the resource as shown:
[oracle@rac12node1 scripts]$ /u01/app/12.1.0.1/grid/bin/crsctl \
> add resource apress.apclu.db -type cluster_resource -file add_res_attr
The file referenced in the command contains key/value pairs defining the resource.
ACL=owner:oracle:rwx,pgrp:dba:rwx,other::r--
ACTION_SCRIPT=/u01/app/oracle/admin/apclu/scripts/ha_apclu.sh
AUTO_START=restore
CARDINALITY=1
DEGREE=1
DESCRIPTION=Custom resource for database apclu
PLACEMENT=restricted
HOSTING_MEMBERS=rac12node1 rac12node2
RESTART_ATTEMPTS=2
SCRIPT_TIMEOUT=60
START_DEPENDENCIES=
hard(ora.DATA.dg,ora.RECO.dg,ora.acfs.orahomevol.acfs)
weak(type:ora.listener.type,uniform:ora.ons)
pullup(ora.DATA.dg,ora.acfs.orahomevol.acfs)
STOP_DEPENDENCIES=
hard(intermediate:ora.asm,shutdown:ora.DATA.dg,shutdown:ora.RECO.dg,ora.acfs.orahomevol.acfs)
FAILURE_INTERVAL=60
FAILURE_THRESHOLD=1
Some of these directives have been taken from the original resource profile, especially those defining the start
and stop dependencies. In the example, /u01/app/oracle/ is an ACFS file system. In a nutshell, this profile allows the
database to be started on rac12node1 and rac12node2, the “hosting members.” For this variable to have an effect, you
need to define a placement policy of “restricted.” The other variables are internal to Clusterware. If you are interested,
you can check their meaning in the Clusterware Administration and Deployment Guide, Appendix B. Do not forget to
check that the database is registered in /etc/oratab on both hosts.
Managing the Database
Instead of using the familiar srvctl command or even sqlplus directly, you need to interact with the database using
the crsctl utility. Although this might sound daunting, it is not. Starting the database, for example, is accomplished
using the following command:
[oracle@rac12node1 scripts]$ /u01/app/12.1.0.1/grid/bin/crsctl \
> start resource apress.apclu.db \
> -n preferredHost
CRS-2672: Attempting to start 'apress.apclu.db' on 'rac12node1'
CRS-2676: Start of 'apress.apclu.db' on 'rac12node1' succeeded
You should make a habit of specifying the host the database should start on specifically as part of the command.
The syntax is very easy to understand. The crsctl command takes a verb and an object to work on. In this case, the
verb is to start and the object is the resource with name “apress.apclu.db”. The optional parameter “-n” specifies which
host the resource should start on.
 
Search WWH ::




Custom Search