You can use the following commands only in an Oracle RAC environment:
crsctl add crs administrator
crsctl add css votedisk
crsctl add serverpool
crsctl check cluster
crsctl check crs
crsctl check resource
crsctl check ctss
crsctl config crs
crsctl delete crs administrator
crsctl delete css votedisk
crsctl delete node
crsctl delete serverpool
crsctl disable crs
crsctl discover dhcp
crsctl enable crs
crsctl get clientid dhcp
crsctl get css
crsctl get css ipmiaddr
crsctl get nodename
crsctl getperm serverpool
crsctl lsmodules
crsctl modify serverpool
crsctl pin css
crsctl query crs administrator
crsctl query crs activeversion
crsctl query crs releaseversion
crsctl query crs softwareversion
crsctl query css ipmiconfig
crsctl query css ipmidevice
crsctl query css votedisk
crsctl query dns
crsctl release dhcp
crsctl relocate resource
crsctl relocate server
crsctl replace discoverystring
crsctl replace votedisk
crsctl request dhcp
crsctl set css
crsctl set css ipmiaddr
crsctl set css ipmiadmin
crsctl setperm serverpool
crsctl start cluster
crsctl start crs
crsctl start ip
crsctl start testdns
crsctl status ip
crsctl status server
crsctl status serverpool
crsctl status testdns
crsctl stop cluster
crsctl stop crs
crsctl stop ip
crsctl stop testdns
crsctl unpin css
crsctl unset css
crsctl unset css ipmiconfig
crsctl check has
crsctl config has
crsctl disable has
crsctl enable has
crsctl query has releaseversion
crsctl query has softwareversion
crsctl start has
crsctl stop has
crsctl check has
SRVCTL Commands for Reference:
CRS RESOURCE STATUS
srvctl status database -d[-f] [-v] [-S ]
srvctl status instance -d-i >[,]
[-f] [-v] [-S]
srvctl status service -d-s [,]
[-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[-o < start-options>]
[-c-q]
srvctl start instance -d-i
[,] [-o ] [-c -q]
srvctl start service -d[-s [,]]
[-i] [-o ] [-c -q]
srvctl start nodeapps -n
srvctl start asm -n[-i ] [-o ]
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[-o ]
[-c-q]
srvctl stop instance -d-i [,]
[-o][-c -q]
srvctl stop service -d[-s [,]]
[-i][-c -q] [-f]
srvctl stop nodeapps -n
srvctl stop asm -n[-i ] [-o ]
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-o [-m ] [-p ]
[-A ip>/ netmask] [-r {PRIMARY PHYSICAL_STANDBY LOGICAL_STANDBY}]
[-s] [-n ]
srvctl add instance -d-i -n
srvctl add service -d-s -r
[-a] [-P ] [-u]
srvctl add nodeapps -n-o
[-A ip>/netmask[/if1[if2...]]]
srvctl add asm -n-i -o
OPTIONS:
-A vip range, node, and database, address specification. The format of
address string is:
[]//[/
host interface2
..]>] [,] []//
[/]
-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[-i ]
srvctl remove service -d-s [-i ]
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[-n ] [-m ]
[-p] [-r {PRIMARY PHYSICAL_STANDBY LOGICAL_STANDBY}]
[-s]
srvctl modify instance -d-i -n
srvctl modify instance -d-i {-s -r}
srvctl modify service -d-s -i
-t[-f]
srvctl modify service -d-s -i
-r [-f]
srvctl modify nodeapps -n[-A ] [-x]
OPTIONS:
-i-t the instance name (-i) is replaced by the instance name (-t)
-i-r the named instance is modified to be a preferred instance
-A address-list for VIP application, at node level
-sadd or remove ASM dependency
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-s [-i ]-t [-f]
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-i [,]
srvctl enable service -d-s ] [, ] [-i ]
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-i [,]
srvctl disable service -d-s ] [,] [-i ]
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
crsctl add crs administrator
crsctl add css votedisk
crsctl add serverpool
crsctl check cluster
crsctl check crs
crsctl check resource
crsctl check ctss
crsctl config crs
crsctl delete crs administrator
crsctl delete css votedisk
crsctl delete node
crsctl delete serverpool
crsctl disable crs
crsctl discover dhcp
crsctl enable crs
crsctl get clientid dhcp
crsctl get css
crsctl get css ipmiaddr
crsctl get nodename
crsctl getperm serverpool
crsctl lsmodules
crsctl modify serverpool
crsctl pin css
crsctl query crs administrator
crsctl query crs activeversion
crsctl query crs releaseversion
crsctl query crs softwareversion
crsctl query css ipmiconfig
crsctl query css ipmidevice
crsctl query css votedisk
crsctl query dns
crsctl release dhcp
crsctl relocate resource
crsctl relocate server
crsctl replace discoverystring
crsctl replace votedisk
crsctl request dhcp
crsctl set css
crsctl set css ipmiaddr
crsctl set css ipmiadmin
crsctl setperm serverpool
crsctl start cluster
crsctl start crs
crsctl start ip
crsctl start testdns
crsctl status ip
crsctl status server
crsctl status serverpool
crsctl status testdns
crsctl stop cluster
crsctl stop crs
crsctl stop ip
crsctl stop testdns
crsctl unpin css
crsctl unset css
crsctl unset css ipmiconfig
crsctl check has
crsctl config has
crsctl disable has
crsctl enable has
crsctl query has releaseversion
crsctl query has softwareversion
crsctl start has
crsctl stop has
crsctl check has
SRVCTL Commands for Reference:
CRS RESOURCE STATUS
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 ip>/ netmask] [-r {PRIMARY PHYSICAL_STANDBY LOGICAL_STANDBY}]
[-s
srvctl add instance -d
srvctl add service -d
[-a
srvctl add nodeapps -n
[-A ip>/netmask[/if1[if2...]]]
srvctl add asm -n
OPTIONS:
-A vip range, node, and database, address specification. The format of
address string is:
[
host interface2
..]>] [,] [
[/
-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
-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
No comments:
Post a Comment