config
The srvctl config
command displays the configuration stored in the Oracle
Clusterware resource attributes.
If you disabled an object for which you are trying to obtain
configuration information using the srvctl
disable
object -n
node_name command,
then bear in mind that using the srvctl
disable
object -n
node_name command
on a per-node basis in your cluster to disable an object throughout the cluster is not the same as
globally disabling an object using the srvctl
disable
object command without the -n
option.
In the former case, the srvctl
config
object command may report that the object is still
enabled.
disable
Disables a specified
object (cluster database, database instance, Oracle ASM instance, or service).
Use the srvctl disable
command when you must shut down an object for maintenance. The
disabled object does not automatically restart.
When you issue the disable
command, the object is
disabled and unavailable to run under Oracle Clusterware for automatic startup,
failover, or restart. Additionally, you cannot run the srvctl start
command on a disabled object until you first re-enable the
object. If you specify -i
instance_name or -n
node_name, then SRVCTL only disables the object on the specified instance
or node.
If you do not specify -i
instance_name or -n
node_name, then the disable
action applies to the object that you specified, globally, on all nodes in the
cluster. Any object you disable globally is also disabled on any nodes you add
to the cluster in the future.
Disabling an object
globally is
not the same as
disabling an object locally on each node in the cluster. For example, if you
disable a database on several nodes, individually, in a cluster, then, when you
run the srvctl start database
command, the database starts only on nodes where the database is
enabled. If, however, you disable the database globally, then the srvctl start database
is rejected because the database is disabled, clusterwide.
enable
The srvctl enable
command enables the specified object so that it can run under
Oracle Clusterware for automatic startup, failover, or restart. The Oracle
Clusterware application supporting the object may be up or down to use this
function. The default value is enable
. If the object is
already enabled, then the command is ignored. Enabled objects can be started,
and disabled objects cannot be started.
getenv
Gets and displays
values for the environment variables from the configuration file. Use SRVCTL
with the setenv
, getenv
, and unsetenv
verbs to administer the environment configurations for
databases, instances, services, and node applications.
setenv
The setenv
command sets values for
the environment in the configuration file. Use setenv
to set environment
variables—items such as language or TNS_ADMIN
—for Oracle Clusterware
that you would typically set in your profile or session when you manage this
database or database instance.
ASM
srvctl status asm [-n node_name]
[-a] [-v]
srvctl start asm –n racdb1
srvctl stop asm -n racdb1 -i +asm1
srvctl config asm [-a]
srvctl config asm -a
srvctl disable asm [-n node_name]
srvctl disable asm -n crmnode1
srvctl enable asm [-n node_name]
srvctl enable asm -n crmnode1
Database
srvctl status database –d
racdb -v
srvctl stop database -d db_unique_name [-o stop_options] [-f]
srvctl stop database -d racdb
–o immediate
srvctl start database -d
db_unique_name [-o start_options] [-n node_name]
srvctl start database -d
racdb [-o start_options] [-n node_name]
srvctl config database
[-d db_unique_name] [-a]
srvctl config database
-d myDB
srvctl disable database
-d db_unique_name [-n node_name]
srvctl disable database
-d mydb1
srvctl enable database
-d db_unique_name [-n node_name]
srvctl enable database
-d mydb1
Diskgroup
srvctl status diskgroup
DATA –v -a
srvctl stop diskgroup -g
diskgroup_name [-n node_list] [-f]
srvctl stop diskgroup -g Data [-n node_list] [-f]
srvctl start diskgroup -g diskgroup_name [-n node_list]
srvctl start diskgroup -g diskgroup1 -n mynode1,mynode2
srvctl disable diskgroup -g diskgroup_name [-n node_list]
srvctl disable diskgroup -g diskgroup1 -n mynode1, mynode2
srvctl enable diskgroup -g diskgroup_name [-n node_list]
srvctl enable diskgroup -g diskgroup1 -n mynode1,mynode2
Instance
srvctl status instance -d db_unique_name {-n node_name | -i "instance_name_list"}
srvctl status instance -d racdb –i racdb1,racdb2 –v
srvctl start instance -d db_unique_name {-n node_name -i "instance_name_list"}
[-o start_options]
srvctl start instance -d crm -n node2
srvctl start instance -d crm -i "crm2,crm3"
srvctl stop instance -d db_unique_name {[-n node_name]|[-i "instance_name_list"]}
[-o stop_options] [-f]
srvctl stop instance -d crm -n node1
srvctl stop instance -d crm -i crm1
srvctl disable instance -d db_unique_name -i instance_name_list
srvctl disable instance -d crm -i "crm1,crm3"
srvctl enable instance -d db_unique_name -i instance_name_list
srvctl enable instance -d crm -i "crm1,crm2"
Listener
srvctl status listener
srvctl start listener –n racdb1
srvctl stop listener –n racdb1
srvctl config listener [-l listener_name] [-a]
srvctl disable listener [-l listener_name] [-n node_name]
srvctl disable listener -l listener_crm -n node5
srvctl enable listener [-l listener_name] [-n node_name]
srvctl enable listener -l listener_crm -n node5
Node Apps
srvctl status nodeapps
srvctl start nodeapps
srvctl stop nodeapps [-n node_name] [-g] [-r] [-f] [-v]
srvctl stop nodeapps
srvctl disable nodeapps [-g] [-v]
srvctl disable nodeapps -g -v
srvctl enable nodeapps [-g] [-v]
srvctl enable nodeapps -g -v
SCAN and SCAN Listener
srvctl status scan_listener
srvctl status scan –i 1
srvctl start scan [-i ordinal_number] [-n node_name]
srvctl start scan -i 1 -n node1
srvctl stop scan [-i ordinal_number] [-f]
srvctl stop scan -i 1
srvctl disable scan_listener [-i ordinal_number]
srvctl disable scan_listener -i 1
srvctl enable scan_listener [-i ordinal_number]
srvctl enable scan_listener -i 1
Server Status
srvctl status server –n racdb1 -a
VIP Status
srvctl status vip –n racdb1 -a
srvctl disable vip -i vip_name [-v]
srvctl disable vip -i vip1 -v
srvctl enable vip -i vip_name [-v]
srvctl enable vip -i crm1-vip -v