----------------------------------------
You can use srvctl to manage these resources. Below are syntax and examples.
SRVCTL command line utility and examples are available at:
10G R2:
http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/srvctladmin.htm
9i R2:
http://download.oracle.com/docs/cd/B10500_01/rac.920/a96596/genadmin.htm#31583
Oracle9i Real Application Clusters AdministrationRelease 2 (9.2)
srvctl status database -d
srvctl status instance -d
[-f] [-v] [-S
srvctl status service -d
[-f] [-v] [-S
srvctl status nodeapps [-n
srvctl status asm -n
EXAMPLES:
Status of the database, all instances and all services.
srvctl status database -d ORACLE -v
Status of named instances with their current services.
srvctl status instance -d ORACLE -i RAC01, RAC02 -v
Status of a named services.
srvctl status service -d ORACLE -s ERP -v
Status of all nodes supporting database applications.
srvctl status node
START CRS RESOURCES
srvctl start database -d
[-c
srvctl start instance -d
[,
srvctl start service -d
[-i
srvctl start nodeapps -n
srvctl start asm -n
EXAMPLES:
Start the database with all enabled instances.
srvctl start database -d ORACLE
Start named instances.
srvctl start instance -d ORACLE -i RAC03, RAC04
Start named services. Dependent instances are started as needed.
srvctl start service -d ORACLE -s CRM
Start a service at the named instance.
srvctl start service -d ORACLE -s CRM -i RAC04
Start node applications.
srvctl start nodeapps -n myclust-4
STOP CRS RESOURCES
srvctl stop database -d
[-c
srvctl stop instance -d
[-o
srvctl stop service -d
[-i
srvctl stop nodeapps -n
srvctl stop asm -n
EXAMPLES:
Stop the database, all instances and all services.
srvctl stop database -d ORACLE
Stop named instances, first relocating all existing services.
srvctl stop instance -d ORACLE -i RAC03,RAC04
Stop the service.
srvctl stop service -d ORACLE -s CRM
Stop the service at the named instances.
srvctl stop service -d ORACLE -s CRM -i RAC04
Stop node applications. Note that instances and services also stop.
srvctl stop nodeapps -n myclust-4
ADD CRS RESOURCES
srvctl add database -d
[-A
[-s
srvctl add instance -d
srvctl add service -d
[-a
srvctl add nodeapps -n
[-A
srvctl add asm -n
OPTIONS:
-A vip range, node, and database, address specification. The format of
address string is:
[
[/
-a for services, list of available instances, this list cannot include
preferred instances
-m domain name with the format “us.mydomain.com”
-n node name that will support one or more instances
-o $ORACLE_HOME to locate Oracle binaries
-P for services, TAF preconnect policy - NONE, PRECONNECT
-r for services, list of preferred instances, this list cannot include
available instances.
-s spfile name
-u updates the preferred or available list for the service to support the
specified instance. Only one instance may be specified with the -u
switch. Instances that already support the service should not be
included.
EXAMPLES:
Add a new node:
srvctl add nodeapps -n myclust-1 -o $ORACLE_HOME –A
139.184.201.1/255.255.255.0/hme0
Add a new database.
srvctl add database -d ORACLE -o $ORACLE_HOME
Add named instances to an existing database.
srvctl add instance -d ORACLE -i RAC01 -n myclust-1
srvctl add instance -d ORACLE -i RAC02 -n myclust-2
srvctl add instance -d ORACLE -i RAC03 -n myclust-3
Add a service to an existing database with preferred instances (-r) and
available instances (-a). Use basic failover to the available instances.
srvctl add service -d ORACLE -s STD_BATCH -r RAC01,RAC02 -a RAC03,RAC04
Add a service to an existing database with preferred instances in list one and
available instances in list two. Use preconnect at the available instances.
srvctl add service -d ORACLE -s STD_BATCH -r RAC01,RAC02 -a RAC03,RAC04 -P PRECONNECT
REMOVE CRS RESOURCES
srvctl remove database -d
srvctl remove instance -d
srvctl remove service -d
srvctl remove nodeapps -n
EXAMPLES:
Remove the applications for a database.
srvctl remove database -d ORACLE
Remove the applications for named instances of an existing database.
srvctl remove instance -d ORACLE -i RAC03
srvctl remove instance -d ORACLE -i RAC04
Remove the service.
srvctl remove service -d ORACLE -s STD_BATCH
Remove the service from the instances.
srvctl remove service -d ORACLE -s STD_BATCH -i RAC03,RAC04
Remove all node applications from a node.
srvctl remove nodeapps -n myclust-4
MODIFY CRS RESOURCES
srvctl modify database -d
[-p
[-s
srvctl modify instance -d
srvctl modify instance -d
srvctl modify service -d
-t
srvctl modify service -d
-r [-f]
srvctl modify nodeapps -n
OPTIONS:
-i
instance name (-t)
-i
-A address-list for VIP application, at node level
-s
EXAMPLES:
Modify an instance to execute on another node.
srvctl modify instance -d ORACLE -n myclust-4
Modify a service to execute on another node.
srvctl modify service -d ORACLE -s HOT_BATCH -i RAC01 -t RAC02
Modify an instance to be a preferred instance for a service.
srvctl modify service -d ORACLE -s HOT_BATCH -i RAC02 –r
RELOCATE SERVICES
srvctl relocate service -d
EXAMPLES:
Relocate a service from one instance to another
srvctl relocate service -d ORACLE -s CRM -i RAC04 -t RAC01
ENABLE CRS RESOURCES (The resource may be up or down to use this function)
srvctl enable database -d
srvctl enable instance -d
srvctl enable service -d
EXAMPLES:
Enable the database.
srvctl enable database -d ORACLE
Enable the named instances.
srvctl enable instance -d ORACLE -i RAC01, RAC02
Enable the service.
srvctl enable service -d ORACLE -s ERP,CRM
Enable the service at the named instance.
srvctl enable service -d ORACLE -s CRM -i RAC03
DISABLE CRS RESOURCES (The resource must be down to use this function)
srvctl disable database -d
srvctl disable instance -d
srvctl disable service -d
EXAMPLES:
Disable the database globally.
srvctl disable database -d ORACLE
Disable the named instances.
srvctl disable instance -d ORACLE -i RAC01, RAC02
Disable the service globally.
srvctl disable service -d ORACLE -s ERP,CRM
Disable the service at the named instance.
srvctl disable service -d ORACLE -s CRM -i RAC03,RAC04
Note: For more information on this see the Oracle10g Real Application Clusters
Administrator’s Guide - Appendix B
No comments:
Post a Comment