Component Abbreviation Description
asm asm Oracle ASM instance
database db Database instance
diskgroup dg Oracle ASM disk group
filesystem filesystem Oracle ASM file system
home home Oracle home or Oracle Clusterware home
listener lsnr Oracle Net listener
service serv Database service
ons, eons ons, eons Oracle Notification Services (ONS)
Oracle entities (such as resources, resource types, and server pools) that have names beginning with ora are managed only by SRVCTL (and not by CRSCTL) unless you are directed to do so by Oracle Support. The cluster specific commands are generally managed by CRSCTL.
Syntax:
srvctl command object options
The available commands used with SRVCTL are:
Command Description
add Adds a component to the Oracle Restart configuration.
config Displays the Oracle Restart configuration for a component.
disable Disables management by Oracle Restart for a component.
enable Reenables management by Oracle Restart for a component.
getenv Displays environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.
modify Modifies the Oracle Restart configuration for a component.
remove Removes a component from the Oracle Restart configuration.
setenv Sets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.
start Starts the specified component.
status Displays the running status of the specified component.
stop Stops the specified component.
unsetenv Unsets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.
For more information go to the Oracle DBA Guide
Here are a matrix of commands/ object combination:
Commands | Objects | Comment |
srvctl add |
instance database |
The OCR is modified. |
srvctl relocate |
service |
You can reallocate a service from one named instance to another named instance. |
srvctl start srvctl status |
instance database nodeapps |
|
srvctl disable |
instance database |
enable = when the server restart the resource must be restarted disable = when the server restart the resource must NOT be restarted (perhaps we are working for some maintenance tasks) |
srvctl config |
database nodeapps |
Lists configuration information from the OCR (Oracle Cluster Registry). |
srvctl getenv |
instance database |
srvctl getenv = displays the environment variables stored in the OCR for target. srvctl unsetenv = llows these variables to be unset |
The most SRVCTL commands are:
srvctl start database -d DBname
srvctl stop database -d DBname
If you don't know the DBname you might run select name from v$database;
srvctl start instance -d DBname -i INSTANCEname
srvctl stop instance -d DBname -i INSTANCEname
srvctl start instance -d DBname -i INSTANCEname
srvctl stop instance -d DBname -i INSTANCEname
srvctl status database -d DBname
srvctl status instance -d DBname -i INSTANCEname
srvctl status nodeapps -n NODEname
srvctl enable database -d DBname
srvctl disable database -d DBname
srvctl enable instance -d DBname -i INSTANCEname
srvctl disable instance -d DBname -i INSTANCEname
srvctl config database -d DBname -> to get some information about the database from OCR.
srvctl getenv nodeaps
ATTENTION:
The following commands are deprecated in Oracle Clusterware 11g release 2 (11.2):
crs_stat
crs_register
crs_unregister
crs_start
crs_stop
crs_getperm
crs_profile
crs_relocate
crs_setperm
crsctl check crsd
crsctl check cssd
crsctl check evmd
crsctl debug log
crsctl set css votedisk
crsctl start resources
crsctl stop resources
In-Oracle.com -> Oracle DBA -> Oracle RAC (Real Application Cluster)
-> SRVCTL command (in Oracle 11gR2)
欢迎光临 重庆思庄Oracle、、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |