Skip Headers
Oracle® Real Application Clusters Administration and Deployment Guide
11g Release 2 (11.2)

Part Number E10718-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

A Server Control Utility Reference

This appendix includes a complete reference for the Server Control Utility (SRVCTL).

See Also:

Chapter 3, "Administering Database Instances and Cluster Databases" for more information about using SRVCTL to manage an Oracle RAC database

This appendix includes the following topics:


Using SRVCTL

This section includes topics that relate to using the SRVCTL utility.


Overview of SRVCTL

Use SRVCTL to manage configuration information. You can use SRVCTL commands to add, remove, start, stop, modify, enable, and disable a number of entities, such as databases, instances, listeners, SCAN listeners, services, grid naming service (GNS), and Oracle ASM.

Some SRVCTL operations modify the configuration data stored in the Oracle Cluster Registry (OCR). SRVCTL performs other operations, such as starting and stopping instances, by sending requests to the Oracle Clusterware process (CRSD), which then starts or stops the Oracle Clusterware resources.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.

Operational Notes for SRVCTL

SRVCTL is installed on each node by default.

This section discusses the following topics:

Usage Information

To use SRVCTL, log in to the operating system of a node and enter the SRVCTL command and its options in case-sensitive syntax as described in "SRVCTL Command Reference".

Guidelines for using SRVCTL are:

Using Comma-Delimited Lists

When specifying a comma-delimited list as part of a SRVCTL command, there should not be any spaces between the items in the list. When you specify a comma-delimited list in a Windows environment, you must enclose the list in double quotation marks (""). You can enclose a comma-delimited list in double quotation marks in a Linux or UNIX environment but they will be ignored.

Specifying a Continuation of Command Line Entries

If you are entering a SRVCTL command, and you want to continue the input on a new line, then you can use the operating system continuation character. In Linux, this is the slash "\" symbol.

Character Set and Case Sensitivity of Object Values

SRVCTL interacts with many different types of objects. The character set and name length limitations, and whether or not the object name is case sensitive, can vary between object types.

Table A-1 String Restrictions for SRVCTL Object Names

Object Type Character Set Limitations Case Sensitive? Maximum Length
db_domain

Alpha-numeric characters, underscore (_), and number sign (#)

 

128 characters

db_unique_name

Alpha-numeric characters, underscore (_), number sign (#), and dollar sign ($); the first 8 characters must be unique because those characters are used to form instance names for policy-managed databases

No

30 characters but the first 8 characters must be unique relative to any other database in the same cluster

diskgroup_name

Naming disk groups have the same limitations as naming other database objects.

See Also: Oracle Database SQL Language Reference for more information about database object naming rules

No (all names are converted to uppercase)

 

instance_name

Alpha-numeric characters

Depends on the platform

8 characters

listener_name

 

 

 

node_name

 

No

 

scan_name

The first character must be an alphabetic character

No

 

server_pool

Alpha-numeric characters, underscore (_), number sign (#), period (.), and dollar sign ($); the name cannot begin with a period, contain single quotation marks (''), nor can the name be "Generic" or "Free" because those two names are reserved for the built-in server pools

 

250 characters

service_name

 

 

250 characters

volume_name

Alphanumeric characters; dashes (-) are not allowed and the first character must be an alphabetic character.

No

11 characters


Summary of Tasks for Which SRVCTL Is Used

SRVCTL is used to manage databases, instances, cluster databases, cluster database instances, Oracle ASM instance and disk groups, services, listeners, or other clusterware resources.

Using SRVCTL Help

To see help for all SRVCTL commands, from the command line enter:

srvctl -h

To see the command syntax and a list of options for each SRVCTL command, from the command line enter:

srvctl command (or verb) object (or noun) -h

To see the SRVCTL version number enter:

$ srvctl -V

Privileges and Security

To use SRVCTL to change your Oracle RAC database configuration, log in to the operating system as the software owner of the home that you want to manage.

For example, if different users installed Oracle Database and the grid infrastructure, then log in as the database software owner (for example, ora_db) to manage databases and log in as the grid infrastructure software owner (for example, ora_asm) to manage the Oracle ASM instances.

Users who are members of the OSDBA operating system group can start and stop the database. To stop and start an Oracle ASM instance, you must be a member of the OSASM operating system group.

To create or register objects such as listeners, Oracle Notification Services (ONS), and services, you must be logged in to the operating system as the software owner of the Oracle home. The objects you create or register for that Oracle home will run under the user account of the owner of the Oracle home. Databases run as the database installation owner of the home from which they run.

To perform srvctl add operations on any object, you must be logged in as the Oracle account owner of the home on which the object runs.


Additional Topics on SRVCTL

Difference between Using SRVCTL and CRSCTL

Use SRVCTL to manage Oracle-supplied resources such as listener, instances, disk groups, and networks, and CRSCTL for managing Oracle Clusterware and its resources.

Note:

Oracle strongly discourages directly manipulating Oracle-supplied resources (resources whose names begin with ora) using CRSCTL. This could adversely impact the cluster configuration.

Stopping Active SRVCTL Commands

Although you may be able to cancel running SRVCTL commands by pressing the Control-C keys, you may corrupt your configuration data by doing this.

You are strongly advised not to attempt to terminate SRVCTL in this manner.


Deprecated Subprograms or Commands

The following command options have been deprecated for Oracle Database 11g release 2 (11.2):

Table A-2 Deprecated Commands and Options for SRVCTL

Command Deprecated Options
srvctl add asm
-n node_name
-i instance_name
-o Oracle_home
-p spfile
srvctl add database
-A {name | IP_address}/netmask
srvctl add listener
-n node_name
srvctl config database
-t
srvctl config listener
-n node_name
srvctl config nodeapps
-n node_name
-l
srvctl config asm
-i instance_name
srvctl disable nodeapps
-n node_name
srvctl enable asm
-i instance_name
srvctl enable nodeapps
-n node_name
srvctl getenv instance
-d db_unique_name
-i instance_name
-t "name=val_list"
srvctl getenv nodeapps
-n node_name
srvctl getenv service
-d db_unique_name
-s service_name
-t "name=val_list"
srvctl modify asm
-o Oracle_home
srvctl modify instance
-s asm_inst_name
-r
srvctl remove asm
-n node_name
-i instance_name
srvctl remove listener
-n node_name
srvctl remove nodeapps
-n "node_name_list"
srvctl setenv instance
-d db_unique_name
-i instance_name
-t "name=val_list"
-T "name=val"
srvctl setenv nodeapps
-n node_name
srvctl setenv service
-d db_unique_name
-s service_name
-t "name=val_list"
-T "name=val"
srvctl start asm
-i instance_name
srvctl status instance
-S level
srvctl status nodeapps
-n node_name
srvctl stop asm
-i instance_name
srvctl unsetenv instance
-d db_unique_name
-i instance_name
-t "name=val_list"
srvctl unsetenv nodeapps
-n node_name
srvctl unsetenv service
-d db_unique_name
-s service_name
-t "name=val_list"


SRVCTL Command Reference

SRVCTL Command Syntax and Options

SRVCTL commands, object names, and options are case sensitive. Database, instance, listener, and service names are case insensitive and case preserving. You cannot create listener names that differ only in case, such as LISTENER and listener. SRVCTL uses the following command syntax:

srvctl command object [options]

In SRVCTL syntax:

Note:

If specifying a comma-delimited list in Windows, then you must enclose the list within double quotation marks ("").

Table A-3 Summary of SRVCTL Commands

Command Description

add

Adds node applications, databases, database instances, Grid Naming Service (GNS), listeners, single client access names (SCANs), Oracle ASM instances, server pools, services, or virtual IPs (VIPs).

config

Lists the configuration for GNS, the node applications, database, Oracle ASM instance, or service.

disable

Disables the database, database instance, GNS, Oracle ASM instance, or service.

enable

Enables the database, database instance, GNS, Oracle ASM instance, or service.

getenv

Displays the environment variable in the configuration for the node applications, database, database instance, or service.

modify

Modifies the node applications, database, database instance, GNS, or service configuration.

relocate

Relocates GNS, OC4J, SCANs, and servers from one node to another.

remove

Removes the node applications, database, database instance, GNS, Oracle ASM instance, or service.

setenv

Sets the environment variable in the configuration for the node applications, database, database instance, or service.

start

Starts the node applications, database, database instance, GNS, Oracle ASM instance, or service.

status

Displays the status of the node applications, database, database instance, GNS, Oracle ASM instance, or service.

stop

Stops the node applications, database, database instance, GNS, Oracle ASM instance, or service.

unsetenv

Unsets the environment variable in the configuration for the node applications, database, database instance, or service.


SRVCTL Objects Summary

Table A-4 lists the keywords that can be used for the object portion of SRVCTL commands. You can use either the full name or the abbreviation for each object keyword. The Purpose column describes the object and the actions that can be performed on that object.

Table A-4 Object Keywords and Abbreviations

Object Keyword Purpose

Oracle Automatic Storage Management

asm

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, and remove Oracle ASM instances.

Database

database

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, and remove databases.

Instance

instance

To add, modify, enable, disable, start, stop, obtain the status of, and remove database instances.

Disk Group

diskgroup

To add, modify, list the configuration of, enable, disable, start, stop, obtain the status of, and remove Oracle ASM disk groups

File system

filesystem

To add, modify, list the configuration of, enable, disable, stop, start, obtain the status of, and remove disk devices for Oracle Automatic Storage Management Cluster File System (Oracle ACFS).

Grid Naming Service (GNS)

gns

To add, modify, list the configuration of, enable, disable, stop, start, obtain the status of, and remove a GNS daemon.

Home directory (for patching)

home

To start, stop, and obtain the status of all clusterware resources related to a Home directory.f

Listener

listener

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, and remove listeners.

Node applications

nodeapps

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, and remove node applications.

Oracle Grid Foundation OC4J container

oc4j

To add, modify, list the configuration of, enable, disable, start, stop, relocate, obtain the status of, and remove OC4J instances

Oracle Notification Service

ons or eons

To add, configure, enable, start, obtain the status of, stop, disable, and remove ONS instances for Oracle Restart

Note: Oracle Notification Service is enhanced for 11g release 2 (11.2) and is abbreviated as eONS.

Single client access name (SCAN)

scan

To add, list the configuration of, modify, enable, disable, start, stop, relocate, obtain the status of, and remove SCAN VIPs

SCAN listener

scan_listener

To add, list the configuration of, modify, enable, disable, start, stop, relocate, obtain the status of, and remove SCAN listeners

Server pool

srvpool

To add, modify, list the configuration of, obtain the status of, and remove server pools

Service

service

To add, modify, list the configuration of, enable, disable, start, stop, obtain the status of, relocate, and remove services

Virtual IP

VIP

To add, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, and remove a VIP



add

The srvctl add command adds the configuration and the Oracle Clusterware applications to the OCR for the cluster database, named instances, named services, or for the named nodes. To perform srvctl add operations, you must be logged in as the database administrator and be the Oracle account owner on Linux and UNIX systems, or you must be logged on as a user with Administrator privileges on Windows systems.

When adding an instance, the name that you specify with -i must match the ORACLE_SID parameter. The database name given with -d db_unique_name must match the DB_UNIQUE_NAME initialization parameter setting. If DB_UNIQUE_NAME is unspecified, then match the DB_NAME initialization parameter setting. The default setting for DB_UNIQUE_NAME uses the setting for DB_NAME. Also, the domain name given with -m db_domain must match the DB_DOMAIN setting.

Table A-5 srvctl add Summary

Command Description

srvctl add asm

Adds Oracle ASM instances

srvctl add database

Adds a database and configuration

srvctl add eons

Adds an eONS daemon

srvctl add filesystem

Adds a volume to Oracle ACFS

srvctl add gns

Adds the Grid Naming Service (GNS) to a cluster

srvctl add instance

Adds one or more instance and configuration

srvctl add listener

Adds a listener to the node

srvctl add nodeapps

Adds node applications

srvctl add oc4j

Adds OC4J instances

srvctl add ons

Adds ONS daemons

srvctl add scan

Adds SCAN VIPs

srvctl add scan_listener

Adds SCAN listeners

srvctl add service

Adds services

srvctl add srvpool

Adds a server pool to a cluster

srvctl add vip

Adds a VIP to a node


srvctl add asm

Adds a record for an Oracle ASM instance to the entire cluster. This command needs to be run only one time from the Oracle grid infrastructure home.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl add asm command with the following syntax:

srvctl add asm [-l listener_name]

This command has only one option, -l, which calls for the name of a listener. If you do not specify this option, then the listener name defaults to LISTENER.


Example

To add a clusterware resource for Oracle ASM on every node in the cluster, use the following command:

srvctl add asm

srvctl add database

Adds a database configuration to your cluster database configuration.

Syntax and Options

Use the srvctl add database command with the following syntax:

srvctl add database -d db_unique_name -o oracle_home
     [-x node_name] [-m domain_name] [-p spfile]
     [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}]
     [-s start_options] [-t stop_options] [-n db_name]
     [-y {AUTOMATIC | MANUAL}] [-g server_pool_list] [-a disk_group_list]
     

Table A-6 srvctl add database Options

Syntax Description
-d db_unique_name

Unique name for the database.

-o oracle_home

The path for the Oracle database home directory.

-x node_name

Node name on which you want to register a single-instance (non-RAC) database.

Note: This option is available only with Oracle Clusterware and cannot be used with the -g option.

-m db_domain

The domain for the database

Note: You must use this option if you set the DB_DOMAIN initialization parameter set for the database.

-p spfile

The path name of the database server parameter file.

-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}

The role of the database in an Oracle Data Guard configuration. The default is PRIMARY.

See Also: Oracle Data Guard Concepts and Administration for more information about database roles

-s start_options

Startup options for the database, such as OPEN, MOUNT, and NOMOUNT.

-t stop_options

Stop options for the database, such as NORMAL, TRANSACTIONAL, IMMEDIATE, and ABORT

-n db_name

The name of the database, if it is different from the unique name given by the -d option

-y {AUTOMATIC | MANUAL}

Management policy for the database, either automatic or manual

-g server_pool_list

Comma-delimited list of server pool names used to control database placement. If you do not specify this option, then it defaults to the Generic server pool.

Note: This option is available only with Oracle Clusterware and cannot be used with the -x option.

-a "disk_group_list"

Comma-delimited list of Oracle ASM disk groups if database uses Oracle ASM storage



Example

An example of this command is:

srvctl add database -d crm -o /u01/oracle/product/112/mydb -m foo.com
     -p +diskgroup1/crm/spfilecrm.ora -r PRIMARY -s open -t normal
     -n database2 -y AUTOMATIC -g svrpool1,svrpool2 -a "diskgroup1,diskgroup2"

srvctl add eons

Adds an eONS daemon to be managed by Oracle Restart.

Note:

This command is only available with Oracle Restart.
Syntax and options
srvctl add eons [-m multicast_ip_address] [-p port_number] 
                [-e eons_listen_port][-v]

Table A-7 srvctl add eons Options

Option Description
-m multicast_ip_address

The multicast IP address for eONS

-p port_number

The port number for eONS

-e eons_listen_port

Local listen port for eONS daemon

Note: If port is not specified, then the default value of 2016 is used.

-v

Verbose output



Example

An example of this command is:

# srvctl add eons -p 2018

srvctl add filesystem

Adds a disk device to Oracle ACFS. This command needs to be run only one time from the Oracle grid infrastructure home.

An Oracle ACFS file system resource is typically created for use with application resource dependency lists. For example, if an Oracle ACFS file system is configured for use as an Oracle Database home, then a resource created for the file system can be included in the resource dependency list of the Oracle Database application. This will cause the file system and stack to be automatically mounted as a result of the start action of the database application.

Note:

To manage Oracle ACFS on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ACFS.
Syntax and Options

Use the srvctl add filesystem command with the following syntax:

srvctl add filesystem -d volume_device -v volume_name -g diskgroup_name
                      [-m mountpoint_path] [-u user_name]

Note:

This command is only available with Oracle Clusterware.

Table A-8 srvctl add filesystem Options

Option Description
-d volume_device

The Volume device path

-v volume_name

The name of the volume

-g diskgroup_name

The name of the Oracle ACFS disk group to which the device should be added

-m mountpoint_path

The mount point path name for the disk device

-u user_name

The name of the user authorized to mount and unmount the filesystem



Example

An example of this command is the following:

srvctl add filesystem -d /dev/asm/d1volume1-295 -v VOLUME1 -d RAC_DATA \
  -m /oracle/cluster1/acfs1

srvctl add gns

Use this command to add the Grid Naming Service (GNS) to a cluster when you are using a DHCP public network.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add gns command with the following syntax:

srvctl add gns -i ip_address -d domain

Table A-9 srvctl add gns Options

Option Description
-i ip_address

The Grid virtual IP (VIP) address

-d domain

The network subdomain that is used for Forward DNS Lookup of cluster IP addresses



Example

An example of this command is:

srvctl add gns -i 192.168.16.17 -d cluster.mycompany.com

srvctl add instance

Adds a configuration for an instance to your cluster database configuration.

You can only use this command for administrator-managed databases. If you have a policy-managed database, then use the srvctl modify srvpool command to add an instance to increase either the maximum size, minimum size, or both, of the server pool used by the database.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add instance command with the following syntax:

srvctl add instance -d db_unique_name -i instance_name -n node_name

Table A-10 srvctl add instance Options

Option Description
-d db_unique_name

The unique name of the database you are adding the instance to

-i instance_name

The name of the instance you are adding

-n node_name

The name of the node on which you are creating the instance



Examples

Examples of this command are:

$ srvctl add instance -d crm -i  crm01 -n gm01
$ srvctl add instance -d crm -i  crm02 -n gm02
$ srvctl add instance -d crm -i  crm03 -n gm03

srvctl add listener

Adds a listener to every node in a cluster.

Syntax and Options

Use the srvctl add listener command with the following syntax:

srvctl add listener [-l listener_name] [-o Oracle_home] 
    [-p "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]
    [-k network_number] [-s]

Table A-11 srvctl add listener Options

Option Description
-l listener_name

Specify a listener name.

If this option is not specified, the default name of LISTENER is used.

-o oracle_home

Specify an Oracle home for the cluster database.

If you do not include this option, then it uses the Grid home by default.

-p "[TCP:]port_list [/IPC:key]
[/NMP:pipe_name]
[/TCPS:s_port]
[/SDP:port]

Protocol specifications for the listener. port_list is a comma-delimited list of TCP ports or listener endpoints.

-k network_number

The optional network number from which VIPs are obtained. If not specified, the VIPs are obtained from the same default network from which the nodeapps VIP is obtained.

-s

Indicates you want to skip the checking of ports



Example

The following command adds a listener named listener112 that is listening on port 1341 and runs from the /ora/ora112 home directory on every node in the cluster:

$ srvctl add listener -l listener112 -p 1341 -o /ora/ora112

srvctl add nodeapps

Adds a node application configuration to the specified node.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add nodeapps command with one the following syntax models:

srvctl add nodeapps -n node_name -A {name | ip}/netmask[/if1[|if2|...]]
  [-m multicast_ip_address] [-p multicast_port_number] [-l ons_local_port] 
  [-r ons_remote-port] [-t host[:port][,host[:port],...]] [-v]
  
srvctl add nodeapps -S subnet/netmask[/if1[|if2|...]] [-d dhcp_server_type] 
  [-m multicast_ip_address] [-p multicast_port_number] [-l ons_local_port] 
  [-r ons_remote-port] [-t host[:port][,host[:port],...]] [-v]

Table A-12 srvctl add nodeapps Options

Option Description
-n node_name

The name of the node on which you want to create the node application. Node name is optional and unnecessary if you run the command on the local node.

-A

This specification creates a traditional VIP node application on the specified node: {name | ip}/netmask[/if1[|if2|...]].

Note: This option must be used for upgrade configurations and new, non-DHCP configurations.

-S subnet/netmask
[/if1[|if2|...]]

Creates a DHCP subnet.

-m multicast_ip_address

The multicast address for the eONS daemon

-p multicast_port_number

The multicast port number for the eONS daemon

-l ons_local_port

The ONS daemon listener port on its node.

If you do not specify this value, the ONS daemon listener port defaults to 6100.

-r ons_remote_port

The port number for remote ONS daemon connections.

If you do not specify a port number, the default value of 6200 is used for the ONS remote port.

-t host[:port],
[host[:port],[...]

A list of host:port pairs of remote hosts that are part of the ONS network but are not part of the Oracle Clusterware cluster

Note: If port is not specified for a remote host, then ons_remote_port is used.

-v

Verbose output


Note:

On Linux and UNIX systems, you must be logged in as root and on Windows, you must be logged in as a user with Administrator privileges to run this command.

Example

An example of this command is:

# srvctl add nodeapps -n crmnode1 -A 1.2.3.4/255.255.255.0

srvctl add oc4j

Adds an OC4J instance to all the nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options
srvctl add oc4j [-v]

This command has only one option, -v, which displays verbose output.


Example

An example of this command is:

srvctl add oc4j

srvctl add ons

Adds an ONS daemon to an Oracle Restart configuration.

Note:

This command is only available with Oracle Restart.
Syntax and options
srvctl add ons [-l ons_local_port] [-r ons_remote_port] 
    [-t host[:port][,host[:port]][...]] [-v]

Table A-13 srvctl add ons Options

Option Description
-l ons_local_port

The ONS daemon listening port for local client connections

-r ons_remote_port

The ONS daemon listening port for connections from remote hosts

-t host[:port][,host[:port]][...]

A list of comma-delimited host:port pairs of remote hosts that are part of the ONS network but are not part of the Oracle Clusterware cluster

Note: If port is not specified for a remote host, then ons_remote_port is used.

-v

Verbose output



Example

An example of this command is:

$ srvctl add ons -l 6200

srvctl add scan

Adds Oracle Clusterware resources for the given SCAN. This command creates the same number of SCAN VIP resources as the number of IP addresses that SCAN resolves to, or 3 when network_number identifies a DHCP network and Oracle GNS configuration.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add scan command with the following syntax:

srvctl add scan -n scan_name [-k network_number]
  [-S subnet/netmask[/if1[|if2|...]]]

Table A-14 srvctl add scan Options

Option Description
-n scan_name

A fully qualified host name, which includes the domain name.

-k network_number

The optional network number from which SCAN VIPs are obtained. If not specified, the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.

-S subnet/netmask
[/if1 [|if2|...]]

Creates the network_number. This option must be specified when network_number does not exist.



Example

An example of this command is:

# srvctl add scan -n scan.mycluster.example.com

srvctl add scan_listener

Adds Oracle Clusterware resources to the SCAN listeners. The number of SCAN listener resources created is the number of SCAN VIP resources.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add scan_listener command with the following syntax:

srvctl add scan_listener [-l lsnr_name_prefix] [-s]
  [-p "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port] [/SDP:port]"]

Table A-15 srvctl add scan_listener Options

Option Description
-l lsnr_name_prefix

The SCAN listener name prefix.

-s

Use the -s option to skip checking of the ports.

-p "[TCP:]port_list
[/IPC:key][/NMP:pipe_name]
[/TCPS:s_port]
[/SDP:port]"

Protocol specifications for the listener. port_list is a comma-delimited list of TCP ports or listener endpoints.

If this option is not specified, then the default TCP port of 1521 is used.



Example

An example of this command is:

# srvctl add scan_listener -l myscanlistener

srvctl add service

Adds services to a database and assigns them to instances. If you have multiple instances of a cluster database on the same node, then always use only one instance on that node for all of the services that node manages.

Syntax and Options

Use the srvctl add service command with one of the following syntax models:

srvctl add service -d db_unique_name -s service_name 
   -r preferred_list [-a available_list] [-P {BASIC | NONE | PRECONNECT}] 
   [-l [PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY]
   [-y {AUTOMATIC | MANUAL}] [-q {TRUE | FALSE}] [-j {SHORT | LONG}]
   [-B {NONE | SERVICE_TIME | THROUGHPUT}] [-e {NONE | SESSION | SELECT}]
   [-m {NONE | BASIC}] [-x {TRUE | FALSE}] 
   [-z failover_retries] [-w failover_delay]
srvctl add service -d db_unique_name -s service_name 
   -u {-r preferred_list | -a available_list}
srvctl add service -d db_unique_name -s service_name 
   -g server_pool [-c {UNIFORM | SINGLETON}] [-k network_number]
   [-l [PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY]
   [-y {AUTOMATIC | MANUAL}] [-q {TRUE | FALSE}] [-j {SHORT | LONG}]
   [-B {NONE | SERVICE_TIME | THROUGHPUT}] [-e {NONE | SESSION | SELECT}]
   [-m {NONE | BASIC}] [-P {BASIC | NONE | PRECONNECT}] [-x {TRUE | FALSE}] 
   [-z failover_retries] [-w failover_delay]

Table A-16 lists and describes all the srvctl add service options and whether they can be used when adding a service to a single-instance or Oracle RAC database.

Table A-16 srvctl add service Options

Option Description
-d db_unique_name

Unique name for the database.

-s service_name

The service name.

-r preferred_list

A list of preferred instances used when the database is administrator managed.

The list of preferred instances must be mutually exclusive with the list of available instances.

Note: This option is available only with Oracle RAC and only for administrator-managed databases.

-a available_list

A list of available instances used when the database is administrator managed.

The list of available instances must be mutually exclusive with the list of preferred instances.

Note: This option is available only with Oracle RAC and only for administrator-managed databases.

-g server_pool

The name of a server pool used when the database is policy managed.

Note: This option is available only with Oracle RAC and only for policy-managed databases.

-c {UNIFORM | SINGLETON}

The cardinality of the service, either UNIFORM (offered on all instances in the server pool) or SINGLETON (runs on only one instance at a time).

Note: This option is available only with Oracle RAC and only for policy-managed databases.

-k network_number

The optional network number from which SCAN VIPs are obtained. If not specified, the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.

Note: This option is available only with Oracle RAC and only for policy-managed databases.

-P {BASIC | NONE | PRECONNECT}

TAF policy specification (for administrator-managed databases only).

Note: You can only use PRECONNECT when you specify the -r and -a options.

-l {[PRIMARY] |
[PHYSICAL_STANDBY] |
[LOGICAL_STANDBY] |
[SNAPSHOT_STANDBY]}

The service role.

You use this option to indicate that the service should should only be automatically started when the Oracle Data Guard database role matches one of the specified service roles.

See Also: Oracle Data Guard Concepts and Administration for more information about database roles

-y {AUTOMATIC | MANUAL}

Service management policy.

AUTOMATIC: The service starts when the database starts.

MANUAL: The service does not start when the database starts.

-q {TRUE | FALSE}

Indicates whether AQ HA notifications should be enabled (TRUE) for this service.

-x {TRUE | FALSE}

Indicates whether or not Distributed Transaction Processing should be enabled for this service. This service will either be a singleton service in a Policy-managed database or a preferred service on a single node in an Administrator-managed database.

Note: This option is available only with Oracle RAC.

-j {SHORT | LONG}

Assign a connection load balancing goal to the service: SHORT if using an integrated connection pool, LONG for long running connections that you want balanced by the number of sessions per node for the service

-B {NONE | SERVICE_TIME | THROUGHPUT}

Goal for the Load Balancing Advisory.

-e {NONE | SESSION | SELECT}

Failover type.

-m {NONE | BASIC}

Failover method.

If the failover type (-e) is set to a value other than NONE, then you should choose BASIC for this option.

-u

Note: This option is available only with Oracle RAC.

-z failover_retries

The number of failover retry attempts.

-w failover_delay

The time delay between failover attempts.



Examples

Use this example syntax to add the gl.example.com service to the my_rac database with AQ HA notifications enabled, a failover method of BASIC, a Connection Load Balancing Goal of LONG, a failover type of SELECT, and 180 failover retries with a delay of 5:

srvctl add service -d my_rac -s gl.example.com -q TRUE -m BASIC \
-e SELECT -z 180 -w 5 -j LONG

Use this example syntax to add a named service to a database with preferred instances in list one and available instances in list two, using preconnect failover for the available instances:

srvctl add service -d crm -s sales -r crm01,crm02 -a crm03 -P PRECONNECT

srvctl add srvpool

Adds a server pool to a cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add srvpool command with the following syntax:

srvctl add srvpool -g server_pool [-i importance] [-l min_size] [-u max_size]
     [-n node_list] [-f]

Table A-17 srvctl add srvpool Options

Option Description
-g server_pool

The name of the server pool.

-i importance

The importance of the server pool (default is 0).

-l min_size

The minimum size of the server pool (default is 0).

-u max_size

The maximum size of the server pool. A value of -1 indicated the size is unlimited.

-n node_names

A comma-separated list of candidate node names. The server pool will only include nodes on the candidate list, but not all nodes on the candidate list will necessarily be in the server pool.

-f

Add the server pool, even if requires stopping resources in other server pools.



Example

An example of this command is:

$ srvctl add srvpool -g srvpool1 -i 1 -l 3 -u 7 -n mynode1,mynode2

srvctl add vip

Adds a VIP to a node.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl add vip command with the following syntax:

srvctl add vip -n node_name -A {name|ip}/netmask[/if1[if2|...]]
     [-k network_number] [-v]

Table A-18 srvctl add vip Options

Option Description
-n node_name

The name of the node on which you are adding the VIP

-A {name|ip}/netmask
[/if1[|if2|...]]

This specification creates a traditional VIP node application on the specified node

-k network_number

The optional network number from which SCAN VIPs are obtained.

If not specified, the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.

-v

Verbose output


Note:

You cannot have multiple VIPs on the same net number (subnet or interface pair) on the same node.

Example

An example of this command is:

# srvctl add vip -n node7 -A 192.168.16.17/255.255.255.0 -k 2

The preceding example creates a network number, 2, for the VIP just added. You can specify the network number after the -k option in other SRVCTL commands.



config

The srvctl config command displays the configuration stored in the Oracle Clusterware resource attributes.

Table A-19 srvctl config Summary

Command Description

srvctl config asm

Displays the configuration for the Oracle ASM instances on the node

srvctl config database

Displays the configuration information of the cluster database

srvctl config eons

Displays configuration information for eONS

srvctl config filesystem

Displays the configuration information for an ACFS volume

srvctl config gns

Displays the GNS configuration

srvctl config listener

Displays a list of configured listeners that are registered with Oracle Clusterware on a given node

srvctl config nodeapps

Displays the configuration information for the node applications

srvctl config oc4j

Displays the configuration of the OC4J instance

srvctl config ons

Displays configuration information for ONS

srvctl config scan

Displays the configuration information for SCAN VIPs

srvctl config scan_listener

Displays the configuration information for SCAN listeners

srvctl config service

Displays the configuration information for the services

srvctl config srvpool

Displays configuration information for a specific server pool

srvctl config vip

Displays the configuration information for the VIP


srvctl config asm

Displays the configuration for all Oracle ASM instances.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl config asm command with the following syntax:

srvctl config asm [-a]

Table A-20 srvctl config asm Options

Option Description
-a

Print detailed configuration information



Example

An example of this command is:

srvctl config asm -a

srvctl config database

Displays the configuration for an Oracle RAC database or lists all configured databases that are registered with Oracle Clusterware.

Syntax and Options

Use the srvctl config database command with the following syntax:

srvctl config database [-d db_unique_name] [-a]

Table A-21 srvctl config database Options

Option Description
-d db_unique_name

Unique name for the database.

If you do not specify this option, then the utility displays the configuration of all database resources.

-a

Print detailed configuration information



Examples

To list the configuration of all databases, use the following example:

srvctl config database

To show the configuration for a specific database, use the following example:

srvctl config database -d db_erp -a

srvctl config eons

Displays configuration information for the eONS daemon.

Note:

This command is only available with Oracle Restart.
srvctl config eons

srvctl config filesystem

Displays the configuration for an Oracle Automatic Storage Management Cluster File System (Oracle ACFS) device.

Syntax and Options

Use the srvctl config filesystem command with the following syntax:

srvctl config filesystem -d volume_device_path

Table A-22 srvctl config filesystem Options

Option Description
-d volume_device_path

The path name of a device that an Oracle ACFS volume uses.



Examples

To list the configuration of all databases, use the following example:

srvctl config database

To show the configuration for a specific database, use the following example:

srvctl config database -d db_erp -a

srvctl config gns

Displays the configuration for GNS.

Note:

This option is available only for Oracle Clusterware.
Syntax and Options

Use the srvctl config gns command with the following syntax:

srvctl config gns

srvctl config listener

Displays a list of configured listeners that are registered with Oracle Clusterware or displays detailed configuration information for a specific listener.

Syntax and Options

Use the srvctl config listener command with the following syntax:

srvctl config listener [-l listener_name] [-a]

Table A-23 srvctl config listener Options

Option Description
-l listener_name

Listener name.

If you do not specify this option, then the name of the listener defaults to LISTENER.

-a

Print detailed configuration information



Example

An example of this command is:

srvctl config listener

srvctl config nodeapps

Displays the VIP configuration for each node in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl config nodeapps command with the following syntax:

srvctl config nodeapps [-a] [-g] [-s] [-e]

Table A-24 srvctl config nodeapps Option

Option Description
-a

Displays the VIP address configuration

-g

Displays the GSD configuration

-s

Displays the ONS configuration

-e

Displays the eONS configuration



Example

An example of this command is:

$ srvctl config nodeapps -a -g -s -e

srvctl config oc4j

Displays configuration information for the OC4J instance.

Note:

This command is only available with Oracle Clusterware.
srvctl config oc4j

srvctl config ons

Displays configuration information for the ONS daemon.

Note:

This command is only available with Oracle Restart.
srvctl config ons

srvctl config scan

Displays the configuration information for all SCAN VIPs, by default, or a specific SCAN VIP identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl config scan command with the following syntax:

srvctl config scan [-i ordinal_number]

The only option available for this command is -i ordinal_number, which identifies any one of the three SCAN VIPs, and can take a range of values from 1 to 3.


Example

An example of this command is:

$ srvctl config scan -i 1

srvctl config scan_listener

Displays the configuration information for all SCAN listeners, by default, or a specific listener identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl config scan_listener command with the following syntax:

srvctl config scan_listener [-i ordinal_number]

The only option available for this command is -i ordinal_number, which identifies any one of the three SCAN VIPs, and can take a range of values from 1 to 3.


Example

An example of this command is:

$ srvctl config scan_listener -i 1

srvctl config service

Displays the configuration for a service.

Syntax and Options

Use the srvctl config service command with the following syntax:

srvctl config service -d db_unique_name [-s service_name] [-a]

Table A-25 srvctl config service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name.

If this option is not specified, then the configuration information for all services configured for the database are displayed.

-a

Print detailed configuration information



Example

An example of this command is:

$ srvctl config service -d crm -s crm_dev

srvctl config srvpool

Displays configuration information including name, minimum size, maximum size, importance, and a list of server names, if applicable, for a specific server pool in a cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl config srvpool command with the following syntax:

srvctl config srvpool [-g server_pool]

Example

An example of this command is:

$ srvctl config srvpool -g dbpool

srvctl config vip

Displays all VIPs on all networks in the cluster except for user VIPs.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl config vip command with one of the following syntax models:

srvctl config vip -n node_name

srvctl config vip -i vip_name

Table A-26 srvctl config vip Options

Option Description
-n node_name

Node name

-i vip_name

The VIP name



Example

An example of this command is:

$ srvctl config vip -n crmnode1


disable

Disables a specified object (cluster database, database instance, Oracle ASM instance, or service). The srvctl disable command is intended to be used when a object needs to be repaired or shut down for maintenance, and should not be restarted automatically.

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 service from running on the specified instance or node.

Table A-27 srvctl disable Summary

Command Description

srvctl disable asm

Disables an Oracle ASM instance

srvctl disable database

Disables the cluster database

srvctl disable diskgroup

Disables a disk group on a number of specified nodes

srvctl disable eons

Disables the eONS daemon

srvctl disable filesystem

Disables an Oracle ACFS volume

srvctl disable gns

Disables GNS

srvctl disable instance

Disables an instance

srvctl disable listener

Disables a listener

srvctl disable nodeapps

Disables a node application and GSD

srvctl disable oc4j

Disables OC4J instances

srvctl disable ons

Disables the ONS daemon

srvctl disable scan

Disables SCAN VIPs

srvctl disable scan_listener

Disables SCAN listeners

srvctl disable service

Disables a service

srvctl disable vip

Disables a VIP


srvctl disable asm

Disables an Oracle ASM instance.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl disable asm command with the following syntax:

srvctl disable asm [-n node_name]

Table A-28 srvctl disable asm Options

Option Description
-n node_name

Node name

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl disable asm -n crmnode1

srvctl disable database

Disables a database. If the database is a cluster database, then its instances are also disabled.

Syntax and Options

Use the srvctl disable database command with the following syntax:

srvctl disable database -d db_unique_name [-n node_name]

Table A-29 srvctl disable database Options

Option Description
-d database_name

Database name

-n node_name

Disables the database from running on the named node

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl disable database -d mydb1

srvctl disable diskgroup

Disables a specific disk group on a number of specified nodes.

Syntax and Options

Use the srvctl disable diskgroup command with the following syntax:

srvctl disable diskgroup -g diskgroup_name [-n node_list]

Table A-30 srvctl disable diskgroup Options

Option Description
-g diskgroup_name

The Oracle ASM disk group name

-n node_list

Comma-delimited list of node names on which to disable the disk group

This option is only available with Oracle Clusterware.



Example

An example of this command is:

$ srvctl disable diskgroup -g diskgroup1 -n mynode1, mynode2

srvctl disable eons

Disables the eONS daemon for Oracle Restart installations.

Note:

This command is only available with Oracle Restart.
srvctl disable eons [-v]

The only option for this command is -v, which indicates that verbose output should be displayed.

srvctl disable filesystem

Disables an Oracle ACFS volume.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl disable filesystem command with the following syntax:

srvctl disable filesystem -d volume_device_name

Table A-31 srvctl disable filesystem Options

Option Description
-d volume_device_name

Name of the Oracle ACFS volume



Example

An example of this command is:

$ srvctl disable filesystem -d /dev/asm/racvol1

srvctl disable gns

Disables GNS for a specific node, or all available nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl disable gns command with the following syntax:

srvctl disable gns [-n node_name]

Table A-32 srvctl disable gns Options

Option Description
-n node_name

Name of a node in the cluster



Example

An example of this command is:

$ srvctl disable gns -n crm7

srvctl disable instance

Disables an instance. If the instance that you disable with this command is the last enabled instance, then this operation also disables the database.

Note:

This command is only available with Oracle Clusterware and Oracle RAC.
Syntax and Options

Use the srvctl disable instance command with the following syntax:

srvctl disable instance -d db_unique_name -i instance_name_list

Table A-33 srvctl disable instance Options

Option Description
-d db_unique_name

Unique name for the database

-i instance_name_list

Comma-delimited list of instance names



Example

An example of this command is:

$ srvctl disable instance -d crm -i "crm1,crm3"

srvctl disable listener

Disables a listener resource.

Syntax and Options

Use the srvctl disable listener command with the following syntax:

srvctl disable listener [-l listener_name] [-n node_name]

Table A-34 srvctl disable listener Options

Option Description
-l listener_name

Name of a listener resource. If you do not specify this option, the name of the listener defaults to LISTENER.

-n node_name

Name of a cluster node on which the listener you want to disable is running.

This option is only available with Oracle Clusterware.



Example

An example of this command is:

$ srvctl disable listener -l listener_crm -n node5

srvctl disable nodeapps

Disables node applications on all nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl disable nodeapps command with the following syntax:

srvctl disable nodeapps [-g] [-v]

Table A-35 srvctl disable nodeapps Options

Option Description
-g

Disables GSD

-v

Verbose output



Example

An example of this command is:

$ srvctl disable nodeapps -g -v

srvctl disable oc4j

Disables the OC4J instance on all nodes or on a specific node.

Syntax and Options

Use the srvctl disable oc4j command with the following syntax:

srvctl disable oc4j [-n node_name] [-v]

Table A-36 srvctl disable oc4j Options

Option Description
-n node_name

The name of a node in the cluster

-v

Verbose output



Example

An example of this command is:

$ srvctl disable oc4j -n crm3

srvctl disable ons

Disables the ONS daemon for Oracle Restart installations.

srvctl disable ons [-v]

The only option for this command is -v, which indicates that verbose output should be displayed.

srvctl disable scan

Disables all SCAN VIPs, by default, or a specific SCAN VIP identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl disable scan command with the following syntax:

srvctl disable scan [-i ordinal_number]

The only option available for this command is -i ordinal_number, which represents which identifies any one of the three SCAN VIPs, and can take a range of values from 1 to 3.


Example

An example of this command is:

$ srvctl disable scan -i 1

srvctl disable scan_listener

Disables all SCAN listeners, by default, or a specific listener identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl disable scan_listener command with the following syntax:

srvctl disable scan_listener [-i ordinal_number]

The only option available for this command is -i ordinal_number, which identifies any one of the three SCAN listeners, and can take a range of values from 1 to 3.


Example

An example of this command is:

$ srvctl disable scan_listener -i 1

srvctl disable service

Disables a service. Disabling an entire service affects all of the instances, disabling each one. When the entire service is already disabled, a srvctl disable service operation on the entire service affects all of the instances and disables them; it just returns an error. This means that you cannot always use the entire set of service operations to manipulate the service indicators for each instance.

Syntax and Options

Use the srvctl disable service command with the following syntax:

srvctl disable service -d db_unique_name
      -s "service_name_list" [-i instance_name | -n node_name]

If you do not specify either the -i instance_name or -n node_name options, then the command disables the service on all nodes.

Table A-37 srvctl disable service Options

Option Description
-d db_unique_name

Unique name for the database

-s "service_name_list"

Comma-delimited list of service names, or a single service name

-i instance_name

The name of the instance that you want to disable the service for.

Note: Use this option with administrator-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.

-n node_name

The name of the node on which to disable the service

Note: Use this option with policy-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.



Examples

The following example globally disables two services for the CRM database:

$ srvctl disable service -d crm -s "crm,marketing"

The following example disables a service for the CRM database that is running on the CRM1 instance, resulting in the service still being available for the database, but on one less instance:

$ srvctl disable service -d crm -s crm -i crm1

srvctl disable vip

Disables a specific VIP.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl disable vip command with the following syntax:

srvctl disable vip -i vip_name [-v]

Table A-38 srvctl disable vip Options

Option Description
-i vip_name

The VIP name

-v

Verbose output



Example

An example of this command is:

$ srvctl disable vip -i vip1 -v


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.

Table A-39 srvctl enable Summary

Command Description

srvctl enable asm

Enables an Oracle ASM instance

srvctl enable database

Enables the database resource

srvctl enable diskgroup

Enables a specified disk group on a number of specified nodes

srvctl enable eons

Enables the eONS daemon

srvctl enable filesystem

Enables an Oracle ACFS volume

srvctl enable gns

Enables GNS

srvctl enable instance

Enables the instance

srvctl enable listener

Enables a listener

srvctl enable nodeapps

Enables node applications and GSD

srvctl enable oc4j

Enables OC4J instances

srvctl enable ons

Enables the ONS daemon

srvctl enable scan

Enables SCAN VIPs

srvctl enable scan_listener

Enables SCAN listeners

srvctl enable service

Enables a service

srvctl enable vip

Enables a VIP


srvctl enable asm

Enables an Oracle ASM instance.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl enable asm command with the following syntax:

srvctl enable asm [-n node_name]

Table A-40 srvctl enable asm Option

Option Description
-n node_name

Node name

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl enable asm -n crmnode1

srvctl enable database

Enables a cluster database and its instances.

Syntax and Options

Use the srvctl enable database command with the following syntax:

srvctl enable database -d db_unique_name [-n node_name]

Table A-41 srvctl enable database Options

Option Description
-d database_name

Database name

-n node_name

The name of the node for which the database resource should be enabled

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl enable database -d mydb1

srvctl enable diskgroup

Enables a specific disk group on a number of specified nodes.

Syntax and Options

Use the srvctl enable diskgroup command with the following syntax:

srvctl enable diskgroup -g diskgroup_name [-n node_list]

Table A-42 srvctl enable diskgroup Options

Option Description
-g diskgroup_name

The Oracle ASM disk group name

-n node_list

Comma-delimited list of node names on which to enable the disk group

This option is only available with Oracle Clusterware.



Example

An example of this command is:

$ srvctl enable diskgroup -g diskgroup1 -n mynode1,mynode2

srvctl enable eons

Enables the eONS daemon for Oracle Restart installations.

srvctl enable eons [-v]

The only option for this command is -v, which indicates that verbose output should be displayed.

srvctl enable filesystem

Enables an Oracle ACFS volume.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl enable filesystem command with the following syntax:

srvctl enable filesystem -d volume_device_name 

Table A-43 srvctl enable filesystem Options

Option Description
-d volume_device_name

Device name of the Oracle ACFS volume



Example

An example of this command is:

$ srvctl enable filesystem  -d /dev/asm/racvol1

srvctl enable gns

Enables GNS on all nodes or a specific node.

Note:

This command is available only with Oracle Clusterware.
Syntax and Options

Use the srvctl enable gns command with the following syntax:

srvctl enable gns [-n node_name]

Table A-44 srvctl enable gns Options

Option Description
-n node_name

Name of the node on which to enable GNS.

If this option is not specified, then GNS is enabled on all nodes in the cluster.



Example

An example of this command is:

$ srvctl enable gns

srvctl enable instance

Enables an instance for an Oracle RAC database. If you use this command to enable all instances, then the database is also enabled.

Note:

This command is only available with Oracle Clusterware and Oracle RAC.
Syntax and Options

Use the srvctl enable instance command with the following syntax:

srvctl enable instance -d db_unique_name -i instance_name_list

Table A-45 srvctl enable instance Option

Option Description
-d db_unique_name

Unique name for the database

-i instance_name_list

Comma-delimited list of instance names.



Example

An example of this command is:

$ srvctl enable instance  -d crm -i "crm1,crm2"

srvctl enable listener

Enables a listener resource.

Syntax and Options

Use the srvctl enable listener command with the following syntax:

srvctl enable listener [-l listener_name] [-n node_name]

Table A-46 srvctl enable listener Options

Option Description
-l listener_name

Name of a listener resource. If you do not specify this option, the name of the listener defaults to LISTENER

-n node_name

Name of a cluster node

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl enable listener -l listener_crm -n node5

srvctl enable nodeapps

Enables the node applications on all nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl enable nodeapps command with the following syntax:

srvctl enable nodeapps [-g] [-v]

Table A-47 srvctl enable nodeapps Options

Option Description
-g

Enables GSD

-v

Verbose output



Example

An example of this command is:

$ srvctl enable nodeapps -g -v

srvctl enable oc4j

Enables the OC4J instance on all nodes or on a specific node.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl enable oc4j command with the following syntax:

srvctl enable oc4j [-n node_name] [-v]

Table A-48 srvctl enable oc4j Options

Option Description
-n node_name

The name of a node in the cluster

-v

Verbose output



Example

An example of this command is:

$ srvctl enable oc4j -n crm3

srvctl enable ons

Enables the ONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl enable ons command with the following syntax:

srvctl enable ons [-v]

The only option for this command is -v, which indicates that verbose output should be displayed.


Example

An example of this command is:

$ srvctl enable oc4j -n crm3

srvctl enable scan

Enables all SCAN VIPs, by default, or a specific SCAN VIP identified by its ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl enable scan command with the following syntax:

srvctl enable scan [-i ordinal_number]

The only option available for this command is -i ordinal_number, which identifies any one of the three SCAN VIPs, and takes a range of values from 1 to 3.


Example

An example of this command is:

$ srvctl enable scan -i 1

srvctl enable scan_listener

Enables all SCAN listeners, by default, or a specific listener identified by its ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl enable scan_listener command with the following syntax:

srvctl enable scan_listener [-i ordinal_number]

The only option available for this command is -i ordinal_number, which identifies any one of the three SCAN listeners, and takes a range of values from 1 to 3.


Example

An example of this command is:

$ srvctl enable scan_listener -i 1

srvctl enable service

Enables a service for Oracle Clusterware. Enabling an entire service also affects the enabling of the service over all of the instances by enabling the service at each one. When the entire service is already enabled, an srvctl enable service operation does not affect all of the instances and enable them. Instead, this operation returns an error. Therefore, you cannot always use the entire set of service operations to manipulate the service indicators for each instance.

Syntax and Options

Use the srvctl enable service command with the following syntax:

srvctl enable service -d db_unique_name -s "service_name_list"
     [-i instance_name | -n node_name]

Table A-49 srvctl enable service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name_list

Comma-delimited list of service names

-i instance_name

Name of the database instance where you want the service to run

Use this option for administrator-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.

-n node_name

Name of the node where you want the service to run

Use this option for policy-managed databases

Note: This option is available only with Oracle Clusterware and Oracle RAC.



Examples

The following example globally enables a service:

$ srvctl enable service -d crm -s crm

The following example enables a service to use a preferred instance:

$srvctl enable service -d crm -s crm -i crm1

srvctl enable vip

Enables a specific VIP.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl enable vip command with the following syntax:

srvctl enable vip -i vip_name [-v]

Table A-50 srvctl enable vip Options

Option Description
-i vip_name

The VIP name

-v

Verbose output



Example

An example of this command is:

$ srvctl enable vip -i crm1-vip -v


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.

Table A-51 srvctl getenv Summary

Command Description

srvctl getenv asm

Gets the Oracle ASM environment values

srvctl getenv database

Gets the database environment values

srvctl getenv listener

Gets the listener environment values

srvctl getenv nodeapps

Gets the node application environment values

srvctl getenv vip

Gets the service environment values


srvctl getenv asm

Displays the values for environment variables associated with Oracle ASM.

Syntax and Options

Use the srvctl getenv asm command with the following syntax:

srvctl getenv asm [-t "name_list"]

Table A-52 srvctl getenv asm Options

Options Description
-t "name_list"

Comma-delimited list of the names of environment variables.

If this option is not specified, then the values of all environment variables associated with Oracle ASM are displayed.



Example

The following example displays the current values for all the environment variables used by Oracle ASM:

$ srvctl getenv asm

srvctl getenv database

Displays the values for environment variables associated with a database.

Syntax and Options

Use the srvctl getenv database command with the following syntax:

srvctl getenv database -d db_unique_name [-t "name_list"]

Table A-53 srvctl getenv database Options

Options Description
-d db_unique_name

Unique name for the database

-t "name_list"

Comma-delimited list of the names of environment variables

If this option is not specified, then the values of all environment variables associated with the database are displayed.



Example

The following example gets the environment configuration for the CRM database:

$ srvctl getenv database -d crm

srvctl getenv listener

Gets the environment variables for the specified listener.

Syntax and Options

Use the srvctl getenv listener command with the following syntax:

srvctl getenv listener [-l listener_name] [-t "name_list"]

Table A-54 srvctl getenv listener Options

Options Description
-l listener_name

Listener name

If this option is not specified, the name of the listener defaults to LISTENER

-t "name_list"

Comma-delimited list of the names of environment variables

If this option is not specified, then the values of all environment variables associated with the listener are displayed.



Example

The following example lists all environment variables for the default listener:

$ srvctl getenv listener

srvctl getenv nodeapps

Gets the environment variables for the node application configurations.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl getenv nodeapps command with the following syntax:

srvctl getenv nodeapps [-a] [-g] [-s] [-e] [-t "name_list"] [-v]

Table A-55 srvctl getenv nodeapps Options

Options Description
-a

Displays the VIP address configuration

-g

Displays the GSD configuration

-s

Displays the ONS configuration

-e

Displays eONS daemon configuration

-t "name_list"

Comma-delimited list of the names of environment variables

If this option is not specified, then the values of all environment variables associated with the nodeapps are displayed.

-v

Verbose output



Example

The following example lists all environment variables for the node applications:

$ srvctl getenv nodeapps -a

srvctl getenv vip

Gets the environment variables for the specified VIP.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl getenv vip command with the following syntax:

srvctl getenv vip -i vip_name [-t "name_list"] [-v]

Table A-56 srvctl getenv vip Options

Options Description
-i vip_name

The name of the VIP

-t "name_list"

Comma-delimited list of the names of environment variables

If this option is not specified, then the values of all environment variables associated with the VIP are displayed.

-v

Verbose output



Example

The following example lists all environment variables for the specified VIP:

$ srvctl getenv vip -i node1-vip


modify

Enables you to modify the instance configuration without removing and adding Oracle Clusterware resources. Using modify preserves the environment in the OCR configuration that would otherwise need to be re-entered. The configuration description is modified in the OCR configuration, and a new Oracle Clusterware profile is generated and registered. The change takes effect when the application is next restarted.

Table A-57 srvctl modify Summary

Command Description

srvctl modify asm

Modifies the configuration for Oracle ASM

srvctl modify database

Modifies the configuration for a database

srvctl modify eons

Modifies the network configuration for the eONS daemon

srvctl modify filesystem

Modifies the user authorized to mount and unmount the Oracle ACFS volume

srvctl modify gns

Modifies the GNS configuration

srvctl modify instance

Modifies the configuration for an instance

srvctl modify listener

Modifies the listener configuration on a node

srvctl modify nodeapps

Modifies the configuration for a node application

srvctl modify oc4j

Modifies the RMI port for an OC4J instance

srvctl modify ons

Modifies the network configuration for the ONS daemon

srvctl modify scan

Modifies the SCAN VIP configuration to match that of a specific SCAN VIP

srvctl modify scan_listener

Updates the SCAN listener configuration to match that of the current SCAN VIP configuration

srvctl modify service

Modifies the configuration for a service

srvctl modify srvpool

Modifies a specific server pool


srvctl modify asm

Modify the listener used by Oracle ASM, the owner of the Oracle ASM software directory, the disk group discovery string used by Oracle ASM, or the SPFILE used by Oracle ASM for a single-instance database or a cluster database.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl modify asm command with the following syntax:

srvctl modify asm [-n node_name] [-l listener_name] 
     [-d asm_diskstring] [-p spfile_path_name]

Table A-58 srvctl modify asm Options

Option Description
-n node_name

Node name

Note: This option is available only with Oracle Clusterware.

-l listener_name

The listener name that Oracle ASM registers with.

Note: This option is available only with Oracle Clusterware and Oracle Restart.

-d asm_diskstring

The new Oracle ASM disk group discovery string.

Note: This option is available only with Oracle Restart.

-p spfile_path_name

The path name of the new spfile to be used by Oracle ASM.

Note: This option is only available for Oracle Restart.



Example

An example of this command to modify the configuration of Oracle ASM is:

$ srvctl modify asm -l lsnr1

srvctl modify database

Modifies the configuration for a database.

Syntax and Options

Use the srvctl modify database command with the following syntax:

srvctl modify database -d db_unique_name [-n db_name]
     [-o oracle_home] [-u user_name] [-m db_domain] [-p spfile] 
     [-r {PRIMARY|PHYSICAL_STANDBY|LOGICAL_STANDBY|SNAPSHOT_STANDBY}]
     [-s start_options] [-t stop_options] [-y {AUTOMATIC | MANUAL}]
     [-g "server_pool_list"] [{-a "diskgroup_list" | -z}]

Table A-59 srvctl modify database Options

Option Description
-d db_unique_name

Unique name for the database

-n db_name

Name of the database (as specified by the DB_NAME initialization parameter), if it is different from the database unique name specified with the -d option

-o oracle_home

Path for the Oracle home for the database

-u user_name

The name of the user that owns the Oracle home directory

Note: If you specify the -u option, you must run this command in privileged mode.

-m db_domain

Domain for the database

Note: If the database has the initialization parameter DB_DOMAIN set, then you must specify this option.

-p spfile

Path name of the server parameter file for the database

-r role [PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY]

Role of the database in an Oracle Data Guard configuration (PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, or SNAPSHOT_STANDBY)

-s start_options

Startup options for the database, for example, OPEN, MOUNT, or NOMOUNT

-t stop_options

Stop options for the database, for example NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

-y [AUTOMATIC | MANUAL]

Management policy for the database resource

-g server_pool_list

A comma-delimited list of the names of server pools to use for a policy-managed database

Notes:

  • If the database you are modifying is administrator managed, then this option changes it to be policy managed, in addition to changing all the database's services to run as uniform services in the specified server pool. You can specify only one server pool for converting an administrator-managed database to policy managed.

  • This option is available only with Oracle Clusterware and Oracle RAC.

-a "diskgroup_list"

Comma-delimited list of Oracle ASM disk groups

-z

To remove the database's dependency on Oracle ASM disk groups



Examples

The following example changes the role of a database to a logical standby:

$ srvctl modify database -d crm -r logical_standby

The following example directs the racTest database to use the SYSFILES, LOGS, and OLTP Oracle ASM disk groups.

$ srvctl modify database -d racTest -a "SYSFILES,LOGS,OLTP"

srvctl modify eons

Modifies the ports used by the eONS daemon that is registered with Oracle Restart or with Oracle Clusterware.

Syntax and Options

Use the srvctl modify eons command with the following syntax:

srvctl modify eons [-m multicast_ip_address] [-p multicast_port_number]
     [-e eons_listen_port][-v]

Table A-60 srvctl modify eons Options

Option Description
-m multicast_ip_address

The multicast IP address for eONS

-p multicast_port_number

The port number for eONS

-e eons_listen_port

Local listen port for eONS daemon

Note: If you do not specify port, then the utility uses the default value of 2016.

-v

Verbose output



Example

An example of this command is:

# srvctl modify eons -p 2018

srvctl modify filesystem

Modifies the name of the user that is authorized to mount and unmount the Oracle ACFS volume.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl modify filesystem command with the following syntax:

srvctl modify filesystem -d volume_device_name -u user_name 

Table A-61 srvctl modify filesystem Options

Option Description
-d volume_device_name

Device name of the Oracle ACFS volume

-u user_name

Name of the user that is authorized to mount and unmount the Oracle ACFS volume



Examples

The following example changes the authorized user to sysad for the RACVOL1 volume:

$ srvctl modify filesystem -d /dev/asm/racvol1 -u sysad

srvctl modify gns

Modifies the IP address or domain used by GNS

Syntax and Options

Use the srvctl modify gns command with the following syntax:

srvctl modify gns [-i ip_address] [-d domain]

Table A-62 srvctl modify gns Options

Option Description
-i ip_address

The IP address for GNS

-d domain

The network domain for GNS



Example

An example of this command is:

$ srvctl modify gns -i 192.000.000.003

srvctl modify instance

For an administrator-managed database, this command modifies the configuration for a database instance from its current node to another node. For a policy-managed database, this command defines an instance name to use when the database runs on the specified node.

Note:

This command is only available with Oracle Clusterware and Oracle RAC.
Syntax and Options

Use the srvctl modify instance command with the following syntax:

srvctl modify instance -d db_unique_name -i instance_name
     {-n node_name | -z}

Table A-63 srvctl modify instance Options

Option Description
-d db_unique_name

Unique name for the database

-i instance_name

Database instance name

-n node_name

Name of the node to run the instance on

-z

To remove existing node instance mapping for a policy-managed database



Examples

An example of this command to relocate a database instance is:

$ srvctl modify instance -d crm -i crm1 -n mynode

The following example of this command causes the database crm when and if it runs on mynode, to use the instance name crm1:

$ srvctl modify instance -d crm -i crm1 -n mynode

The following example removes the directive established by the previous example:

$ srvctl modify instance -d crm -i crm1 -z

srvctl modify listener

Modifies the listener name, ORACLE_HOME path or the listener endpoints, either for the default listener, or a specific listener, or for all the listeners represented in a given list of listener names, that are registered with Oracle Restart or with Oracle Clusterware on the specified node.

If you want to change the name of a listener, then use the srvctl remove listener and srvctl add listener commands.

Syntax and Options

Use the srvctl modify listener command with the following syntax:

srvctl modify listener [-l listener_name] [-o oracle_home] [-u user_name]
     [-p "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]
     [-k network_number]

Table A-64 srvctl modify listener Options

Option Description
-l listener_name

The name of the listener.

If you do not specify this option, then the utility uses the name LISTENER.

-o oracle_home

When this option is specified, SRVCTL moves the listener to run from the specified Oracle home.

Note: When using this option, the command should be run as privileged user to enable SRVCTL to update resource ownership corresponding to the new ORACLE_HOME owner

-u user_name

The name of the operating system user who will own the specified Oracle home

Note: This option is available only with Oracle Clusterware.

-p "[TCP:]port_list [/IPC:key][/NMP:pipe_name]
[/TCPS:s_port][/SDP:port]"

Protocol specifications for the listener. port_list is comma-delimited list of port numbers.

-k network_number

This option changes the public subnet on which the listener listens.

Note: You should have at least one listener on the default network at all times. Do not use this option to change the network of the only listener that listens on the default network.



Example

The following example changes the TCP ports for the default listener on the node mynode1:

$ srvctl modify listener -n mynode1 -p "TCP:1521,1522"

srvctl modify nodeapps

Modifies the configuration for a node application.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl modify nodeapps command with one of the following syntax models:

srvctl modify nodeapps [-n node_name -A new_vip_address]
[-S subnet/netmask[/if1[|if2|...]]
     [-m multicast_ip_address] [-p multicast_port_number]
     [-e eons_listen_port] [-l ons_local_port] [-r ons_remote_port]
     [-t host[:port][,host:port,...]] [-v]

Table A-65 srvctl modify nodeapps Options

Option Description
-n node_name

Node name.

-A new_vip_address

Node level Virtual IP address. The address specified by name or IP must match the subnet number of the default network.

Note: This option must be used for upgrade configurations and new non-DHCP configurations

-S subnet/netmask
[/if1[|if2|...]]

Specifies a subnet number for the public network. The netmask and interfaces specified, if any, must match those of the default network. Additionally, if you specify the netmask option, then you need only specify it for the first node on each network.

-m multicast_ip_address

Multicast IP address for the eONS daemon.

-p multicast_port_number

Multicast port number for the eONS daemon.

-e eons_listen_port

Port on which the eONS daemon listens for local client connections.

If you do not specify this option, then the utility uses the default port number.

-l ons_local_port

Port on which the ONS daemon listens for local client connections.

-r ons_remote_port

Port on which the ONS daemon listens for connections from remote hosts.

-t host:port, [host:port,...]

List of host:port pairs of remote hosts that are part of the ONS network but are not part of the cluster. If you do not specify a port for a remote host, then the utility uses the value you specified for ons_remote_port.

-v

Verbose output.



Example

The following example changes the nodeapps resource on mynode1 to use the application VIP of 100.200.300.40 with a subnet mask of 255.255.255.0 on the network interface eth0:

$ srvctl modify nodeapps -n mynode1 -A 100.200.300.40/255.255.255.0/eth0

srvctl modify oc4j

Modifies the RMI port for the OC4J instances.

Syntax and Options

Use the srvctl modify oc4j command with the following syntax:

srvctl modify oc4j -p oc4j_rmi_port [-v]

Table A-66 srvctl modify oc4j Options

Option Description
-p oc4j_rmi_port

The RMI port number used by the OC4J instance

-v

Verbose output



Example

An example of this command is:

$ srvctl modify oc4j -p 5385

srvctl modify ons

Modifies the ports used by the ONS daemon that is registered with Oracle Restart or with Oracle Clusterware.

Syntax and Options

Use the srvctl modify ons command with the following syntax:

srvctl modify ons [-l ons_local_port] [-r ons_remote_port]
     [-t host[:port][,host[:port]][...]] [-v]

Table A-67 srvctl modify ons Options

Option Description
-l ons_local_port

The ONS daemon listening port for local client connections

-r ons_remote_port

The ONS daemon listening port for connections from remote hosts

-t host[:port]
[,host[:port]][...]]

A list of host:port pairs of remote hosts that are part of the ONS network but are not part of the Oracle Clusterware cluster

Note: If you do not specify port for a remote host, then the utility uses ons_remote_port.

-v

Display verbose output



srvctl modify scan

Modifies the SCAN VIP configuration to the match that of another SCAN VIP you specify with scan_name. If scan_name currently resolves to more IP addresses than when it was initially configured, then the utility creates new Oracle Clusterware resources for those additional IP addresses. If scan_name currently resolves to fewer IP addresses, then the utility removes Oracle Clusterware resources for SCAN VIP addresses with numerically higher ordinal numbers until the remaining SCAN VIP resources match the number of IP addresses to which scan_name resolves.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl modify scan command with the following syntax:

srvctl modify scan -n scan_name

The only option available for this command is -n scan_name, which identifies the SCAN VIP that has the configuration you want to use.


Example

An example of this command is:

$ srvctl modify scan -n scan1

srvctl modify scan_listener

Modifies the SCAN listener to match SCAN VIP's or modifies the SCAN listener endpoints.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl modify scan_listener command with the following syntax:

srvctl modify scan_listener {-p [TCP:]port[/IPC:key][/NMP:pipe_name]
     [/TCPS:s_port][/SDP:port] | -u }

Table A-68 srvctl modify scan_listener Options

Option Description
-p [TCP:]port[/IPC:key]
[/NMP:pipe_name]
[/TCPS:s_port][/SDP:port]

The new SCAN listener end points

-u

Updates SCAN listener configuration to match the current SCAN VIP configuration. This option adds new resources or removes existing SCAN listener resources to match the SCAN VIP resources.



Example

An example of this command is:

$ srvctl modify scan_listener -u

srvctl modify service

Moves a service member from one instance to another. Additionally, this command changes which instances are to be the preferred and the available instances for a service. This command supports some online modifications to the service, such as:

As a result of these considerations, when the online service is being modified, users may experience a brief service outage on some instances even if the instances are not being removed. Or users may experience a brief service outage on instances that are being removed from the service.

Important:

Oracle recommends that you limit configuration changes to the minimum requirement and that you not perform other service operations while the online service modification is in progress.

Syntax and Options

Use one of the following forms of the srvctl modify service command with the specified syntax:

To move a service from one instance to another:

Note:

This form of the command is only available with Oracle Clusterware.
srvctl modify service -d db_unique_name -s service_name -i old_instance_name 
     -t new_instance_name [-f]

Table A-69 srvctl modify service Options for Moving a Service

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-i old_instance_name

Old instance name

-t new_instance_name

New instance name

-f

Disconnect all sessions during stop or relocate service operations


To change an available instance to a preferred instance for a service:

Note:

This form of the command is only available with Oracle Clusterware.
srvctl modify service -d db_unique_name -s service_name -i avail_inst_name -r [-f]

Table A-70 srvctl modify service Options for Changing an Available Instance to a Preferred Instance

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-i available_inst_name

Name of the available instance to change

-r

Change instance status to preferred

-f

Disconnect all sessions during stop or relocate service operations


To change the available and preferred status for multiple instances:

Note:

This form of the command is only available with Oracle Clusterware.
srvctl modify service -d db_unique_name -s service_name -n -i preferred_list 
     [-a available_list] [-f]

Table A-71 srvctl modify service Options for Changing Available and Preferred Status of Multiple Instances

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-n

Uses only the instances named for this service (unnamed instances already assigned to the service are removed)

-i preferred_instance_list

List of preferred instances

-a available_instance_list

List of available instances

-f

Disconnect all sessions during stop or relocate service operations


To modify other service attributes or to modify a service for Oracle Restart:

srvctl modify service -d db_unique_name -s service_name
     [-c {UNIFORM|SINGLETON}] [-P {BASIC|PRECONNECT|NONE}] 
     [-l {[PRIMARY] | [PHYSICAL_STANDBY] | [LOGICAL_STANDBY] | [SNAPSHOT_STANDBY]}
     [-q {TRUE|FALSE}] [-x {TRUE|FALSE}] [-j {SHORT|LONG}] 
     [-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}] 
     [-m {NONE|BASIC}] [-z failover_retries] [-w failover_delay]
     [-y {AUTOMATIC | MANUAL}]

Table A-72 srvctl modify service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-c {UNIFORM | SINGLETON}

The cardinality of the service, either UNIFORM (offered on all instances in the server pool) or SINGLETON (runs on only one instance at a time)

Note: This option is available only with Oracle Clusterware.

-P {BASIC|PRECONNECT|NONE}

TAF failover policy

-l {[PRIMARY] | [PHYSICAL
_STANDBY] | [LOGICAL
_STANDBY] | [SNAPSHOT
_STANDBY]}

The database modes for which the service should be started automatically.

-q {TRUE | FALSE}

Indicates whether AQ HA notifications should be enabled (TRUE) for this service

-x {TRUE | FALSE}

Indicates whether or not Distributed Transaction Processing should be enabled for this service

Note: This option is available only with Oracle Clusterware.

-j {SHORT | LONG}

Connection Load Balancing Goal

-B {NONE | SERVICE_TIME | THROUGHPUT}

Runtime Load Balancing Goal

-e {NONE | SESSION | SELECT}

Failover type

-m {NONE | BASIC}

Failover method

-z failover_retries

The number of failover retry attempts

-w failover_delay

The time delay between failover attempts

-y {AUTOMATIC | MANUAL}

Service management policy



Examples

An example of moving a service member from one instance to another is:

$ srvctl modify service -d crm -s crm -i crm1 -t crm2

An example of changing an available instance to a preferred instance is:

srvctl modify service -d crm -s crm -i crm1 -r

The following command exchanges a preferred and available instance:

$ srvctl modify service -d crm -s crm -n -i crm1 -a crm2

srvctl modify srvpool

Modifies a server pool in a cluster. If minimum size, maximum size, and importance are numerically increased, then the CRS daemon may attempt to reassign servers to this server pool, if by resizing other server pools have comparatively lower minimum size and importance, to satisfy new sizes of this server pool.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl modify srvpool command with the following syntax:

srvctl modify srvpool -g server_pool [-i importance] [-l min_size]
     [-u max_size] [-n node_name_list] [-f]

Table A-73 srvctl modify srvpool Options

Option Description
-g server_pool

The name of the server pool to modify,

-i importance

The new importance of the server pool.

-l min_size

The new minimum size of the server pool. The default value is 0.

-u max_size

The new maximum size of the server pool. A value of -1 sets the server pool maximum size to UNLIMITED.

-n node_name_list

A comma-delimited list of candidate server names.

-f

Force the operation even though the utility stops some resource(s).



Example

The following example changes the importance rank to 0, the minimum size to 2, and the maximum size to 4 for the server pool srvpool1 on the nodes mynode3 and mynode4:

$ srvctl modify srvpool -g srvpool1 -i 0 -l 2 -u 4 -n mynode3, mynode4


relocate

Relocates the named service names from one named instance to another named instance. The srvctl relocate command works on only one source instance and one target instance at a time, relocating a service from a single source instance to a single target instance. The target instance must be on the preferred or available list for the service.

The relocation of the service is temporary until you modify the configuration. The modify command described permanently changes the service configuration.

Table A-74 srvctl relocate Summary

Command Description

srvctl relocate gns

Relocates GNS to a new node

srvctl relocate oc4j

Relocates an OC4J instance to a new node

srvctl relocate scan

Relocates a SCAN VIP from its current hosting server to another server within the cluster

srvctl relocate scan_listener

Relocates a SCAN listener from its current hosting server to another server within the cluster

srvctl relocate server

Relocates named servers to another server pool

srvctl relocate service

Relocates the named service names from one named instance to another named instance


srvctl relocate gns

Relocates GNS from its current hosting node to another node within the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl relocate gns command with the following syntax:

srvctl relocate gns [-n node_name]

Table A-75 srvctl relocate gns Options

Option Description
-n node_name

The name of the node to which you want to move GNS



Example

An example of this command is:

$ srvctl relocate gns -n node1

srvctl relocate oc4j

Relocates an OC4J instance from its current hosting node to another node within the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl relocate oc4j command with the following syntax:

srvctl relocate oc4j [-n node_name] [-v]

Table A-76 srvctl relocate oc4j Options

Option Description
-n node_name

The name of the node to relocate the OC4J instance to.

-v

Display verbose output



Example

An example of this command is:

$ srvctl relocate oc4j -n staih01 -v

srvctl relocate scan

Relocates a specific SCAN VIP from its current hosting node to another node within the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl relocate scan command with the following syntax:

srvctl relocate scan -i ordinal_number [-n node_name]

Table A-77 srvctl relocate scan Options

Option Description
-i ordinal_number

An ordinal number that identifies which SCAN VIP you want to relocate. The range of values you can specify for this option is 1 to 3.

-n node_name

The name of a single node.

If you do not specify this option, then the utility chooses the node to which the SCAN VIP is relocated.



Example

An example of this command is:

$ srvctl relocate scan -i 1 -n node1

srvctl relocate scan_listener

Relocates a specific SCAN listener from its current hosting node to another node within the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl relocate scan_listener command with the following syntax:

srvctl relocate scan_listener -i ordinal_number [-n node_name]

Table A-78 srvctl relocate scan_listener Options

Option Description
-i ordinal_number

An ordinal number that identifies which SCAN VIP you want to relocate. The range of values you can specify for this option is 1 to 3.

-n node_name

The name of a single node.

If you do not specify this option, then the utility chooses the node to which the SCAN VIP is relocated.



Example

An example of this command is:

$ srvctl relocate scan_listener -i 1

srvctl relocate server

Relocates servers to a server pool in the cluster.

Syntax and Options

Use the srvctl relocate server command with the following syntax:

srvctl relocate server -n "server_name_list" -g server_pool_name [-f]

Table A-79 srvctl relocate server Options

Option Description
-n "server_name_list"

A single server name or a comma-delimited list of server names enclosed in double quotation marks ("") that you want to relocate to a different server pool.

-g server_pool_name

The name of the server pool to which you want to move servers.

-f

Use the -f option to force the relocation of servers even if it means stopping some resources.



Example

An example of this command is:

$ srvctl relocate server -n "server1, server2" -g sp3

srvctl relocate service

Temporarily relocates a service member to run on another instance.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl relocate service command with the following syntax:

srvctl relocate service -d db_unique_name -s service_name
    {-c source_node -n target_node | -i old_instance_name -t new_instance_name}
    [-f]

Table A-80 srvctl relocate service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-c source_node

Name of the node where the service is currently running

-n target_node

Name of node where the service should be relocated

-i old_instance_name

Old instance name

-t new_instance_name

New instance name

-f

Disconnect all sessions during stop or relocate service operations



Example

To temporarily relocate a named service member from crm1 to crm3:

$ srvctl relocate service -d crm -s crm -i crm1 -t crm3


remove

Removes the configuration information for the specified target from Oracle Clusterware. Environment settings for the object are also removed. Using this command does not destroy the specified target.

Use the remove verb to remove the associated resource from the management of Oracle Clusterware or Oracle Restart. Depending on the noun used, you can remove databases, services, nodeapps, Oracle ASM, ONS, eONS, and listeners.

If you do not use the force flag (-f), then Oracle Clusterware or Oracle Restart prompts you to confirm whether to proceed. If you use the force (-f) option, then the remove operation proceeds without prompting and continues processing even when it encounters errors. Even when the Oracle Clusterware resources cannot be removed, the OCR configuration is removed, so that the object now appears not to exist, but there are still Oracle Clusterware resources. Use the force flag (-f) option with extreme caution because this could result in an inconsistent OCR.

To use the remove verb, you must first stop the node applications, database, instance, or service for which you are specifying srvctl remove. Oracle recommends that you perform a disable operation before using this command, but this is not required. You must stop the target object before running the srvctl remove command. See the stop command.

Table A-81 srvctl remove Summary

Command Description

srvctl remove asm

Removes Oracle ASM instances

srvctl remove database

Removes a database and configuration

srvctl remove diskgroup

Removes a disk group from the Oracle Clusterware or Oracle Restart configuration

srvctl remove eons

Removes the eONS daemon from the Oracle Clusterware or Oracle Restart configuration

srvctl remove filesystem

Removes the configuration for an Oracle ACFS volume

srvctl remove gns

Removes GNS

srvctl remove instance

Removes instances and configurations of administrator-managed databases

srvctl remove listener

Removes the listener from the specified node

srvctl remove nodeapps

Removes node applications

srvctl remove oc4j

Removes the OC4J instance configuration

srvctl remove ons

Removes ONS instances

srvctl remove scan

Removes all Oracle Clusterware resources for all SCAN VIPs

srvctl remove scan_listener

Removes all Oracle Clusterware resources for all SCAN listeners

srvctl remove service

Removes services from the Oracle Clusterware or Oracle Restart configuration

srvctl remove srvpool

Removes a specific server pool

srvctl remove vip

Removes specific VIPs


srvctl remove asm

Removes the Oracle ASM resource.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl remove asm command with the following syntax:

srvctl remove asm [-f]

The -f option is the only option you can use with this command and it forcefully removes an Oracle ASM resource.


Example

An example of this command is:

$ srvctl remove asm -f

srvctl remove database

Removes a database configuration.

Syntax and Options

Use the srvctl remove database command with the following syntax:

srvctl remove database -d db_unique_name [-f] [-y]

Table A-82 srvctl remove database Options

Options Description
-d db_unique_name

Unique name for the database

-f

Force remove

-y

Suppress prompts



Example

An example of this command is:

$ srvctl remove database -d crm

srvctl remove diskgroup

Removes a specific Oracle ASM disk group resource from Oracle Clusterware or Oracle Restart.

Syntax and Options

Use the srvctl remove diskgroup command with the following syntax:

srvctl remove diskgroup -g diskgroup_name [-n node_list] [-f]

Table A-83 srvctl remove diskgroup Options

Option Description
-g diskgroup_name

The Oracle ASM disk group name.

-n node_list

Comma-delimited list of node nodes.

Note: This option is available only with Oracle Clusterware.

-f

Force remove.



Example

An example of this command is:

$ srvctl remove diskgroup -g DG1 -f

srvctl remove eons

Removes eONS the Oracle Restart or Oracle grid infrastructure home.

srvctl remove eons [-f] [-v]

Table A-84 srvctl remove eons Options

Options Description
-f

Force remove

-v

Verbose output


srvctl remove filesystem

Removes a specific Oracle ACFS volume resource.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove filesystem command with the following syntax:

srvctl remove filesystem -d volume_device_name [-f]

Table A-85 srvctl remove filesystem Options

Option Description
-d volume_device_name

The Oracle ACFS volume device name

-f

Force remove



Example

An example of this command is:

$ srvctl remove filesystem -d /dev/asm/racvol1

srvctl remove gns

Removes GNS from the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove gns command with the following syntax:

srvctl remove gns [-f]

The only option for this command is -f, which indicates GNS should be removed regardless of any errors that might occur.


Example

An example of this command is:

$ srvctl remove gns

srvctl remove instance

Removes the configurations for an instance of an administrator-managed database. To remove the configurations of a policy-managed database, you must shrink the size of the server pool with the srvctl modify srvpool command.

If you use the -f option, then any services running on the instance stop. Oracle recommends that you reconfigure services to not use the instance to be removed as a preferred or available instance before removing the instance.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove instance command with the following syntax:

srvctl remove instance -d db_unique_name -i instance_name [-f]

Table A-86 srvctl remove instance Options

Options Description
-d db_unique_name

Unique name for the database.

-i instance_name

Instance name.

-f

Specify this option to skip checking that the instance is not running, and remove it even though it is running. This option also skips checking that the instance has no running services using it, and causes those services to stop before the instance is removed.



Example

An example of this command is:

$ srvctl remove instance -d crm -i crm01

srvctl remove listener

Removes the listener from the Oracle Clusterware or Oracle Restart configuration.

Syntax and Options

Use the srvctl remove listener command with the following syntax:

srvctl remove listener [-l listener_name] [-f]

Table A-87 srvctl remove listener Options

Options Description
-l listener_name

Name of the listener that you want to remove.

If you do not specify this option, then the listener name defaults to LISTENER.

-f

Specify this option to skip checking whether there are other resources that depend on this listener, such as databases, and remove the listener anyway.



Examples

The following command removes the listener lsnr01 from the node1 node:

$ srvctl remove listener -l lsnr01

srvctl remove nodeapps

Removes the node application configuration. You must have full administrative privileges to run this command. On Linux and UNIX systems, you must be logged in as root and on Windows systems, you must be logged in as a user with Administrator privileges.

Note:

This command is only available with Oracle Clusterware.
Syntax

Use the srvctl remove nodeapps command as follows:

srvctl remove nodeapps [-f] [-y] [-v]

Example

An example of this command is:

$ srvctl remove nodeapps

Table A-88 srvctl remove nodeapps Options

Options Description
-f

Force remove

-y

Suppress prompts

-v

Verbose output



srvctl remove oc4j

Removes the OC4J instance from the Oracle Clusterware configuration.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove oc4j command with the following syntax:

srvctl remove oc4j [-f] [-v]

Table A-89 srvctl remove oc4j Options

Options Description
-f

Force remove

-v

Verbose output



srvctl remove ons

Removes ONS from the grid infrastructure home.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl remove ons command with the following syntax:

srvctl remove ons [-f] [-v]

Table A-90 srvctl remove ons Options

Options Description
-f

Force remove

-v

Verbose output



srvctl remove scan

Removes Oracle Clusterware resources from all SCAN VIPs.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove scan command with the following syntax:

srvctl remove scan [-f]

The only option available for this command is -f, which indicates the removal should proceed regardless of any errors received.


Example

An example of this command is:

$ srvctl remove scan -f

srvctl remove scan_listener

Removes Oracle Clusterware resources from all SCAN listeners.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove scan_listener command with the following syntax:

srvctl remove scan_listener [-f]

The only option available for this command is -f, which indicates the removal should proceed regardless of any errors received.


Example

An example of this command is:

$ srvctl remove scan_listener -f

srvctl remove service

Removes the configuration for a service.

Syntax and Options

Use the srvctl remove service command as follows:

srvctl remove service -d db_unique_name -s service_name [-i instance_name] [-f]

Table A-91 srvctl remove service Options

Options Description
-d db_unique_name

Unique name for the database

-s service_name

Service name

-i instance_name

Instance name

Note: This option is available only for Oracle Clusterware.

-f

Force remove



Examples

An example of this command is:

$ srvctl remove service -d crm -s sales

The following example removes the services from specific instances:

$ srvctl remove service -d crm -s sales -i crm01,crm02

srvctl remove srvpool

Removes a specific server pool. If there are databases or services that depend upon this server pool, then remove them first so this operation succeeds.

If you successfully remove server_pool, then the CRS daemon may assign its servers to other server pools depending upon their minimum size, maximum size, and importance. The CRS daemon may also return these servers to its Free server pool.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove srvpool command with the following syntax:

srvctl remove srvpool -g server_pool

Example

An example of this command is:

$ srvctl remove srvpool -g srvpool1

srvctl remove vip

Removes specific VIPs.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl remove vip command with the following syntax:

srvctl remove vip -i "vip_name_list" [-f] [-y] [-v]

Table A-92 srvctl remove vip Options

Option Description
-i "vip_name_list"

A comma-delimited list of VIP names surrounded by double quotation marks ("")

-f

Force remove

-y

Suppress prompts

-v

Verbose output



Example

An example of this command is:

$ srvctl remove vip -i "vip1,vip2,vip3" -f -y -v


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.

The unsetenv command unsets values for the environment in the configuration file.

Table A-93 srvctl setenv Summary

Command Description

srvctl setenv asm

Administers environment configuration for Oracle ASM

srvctl setenv database

Administers cluster database environment configurations

srvctl setenv listener

Administers listener environment configurations

Note: You cannot use this command to administer SCAN listeners.

srvctl setenv nodeapps

Administers node application environment configurations

srvctl setenv vip

Administers VIP environment configurations


srvctl setenv asm

Administers Oracle ASM environment configurations.

Syntax and Options

Use the srvctl setenv asm command with the following syntax:

srvctl setenv asm {-t "name=val[,name=val][...]" | -T "name=val"}

Table A-94 srvctl setenv asm Options

Options Description
-t "name=val[,name=val][...]"

Comma-delimited list of name-value pairs of environment variables

-T "name=val"

Enables single environment variable to be set to a value that contains commas or other special characters



Example

The following example sets the language environment configuration for Oracle ASM:

$ srvctl setenv asm -t LANG=en

srvctl setenv database

Administers cluster database environment configurations.

Syntax and Options

Use the srvctl setenv database command with the following syntax:

srvctl setenv database -d db_unique_name 
     {-t "name=val[,name=val][...]" | -T "name=val"}

Table A-95 srvctl setenv database Options

Options Description
-d db_unique_name

Unique name for the database

-t "name=val,..."

Comma-delimited list of name-value pairs of environment variables

-T "name=val"

Enables single environment variable to be set to a value that contains commas or other special characters



Example

The following example sets the language environment configuration for a cluster database:

$ srvctl setenv database -d crm -t LANG=en

srvctl setenv listener

Administers listener environment configurations.

Syntax and Options

Use the srvctl setenv listener with the following syntax:

srvctl setenv listener [-l listener_name] 
     {-t "name=val[,name=val][...]" | -T "name=val"}

Table A-96 srvctl setenv listener Options

Options Description
-l listener_name

Name of the listener.

If you do not specify this option, then the listener name defaults to LISTENER.

-t "name=val"

Comma-delimited list of name-value pairs of environment variables.

-T "name=val"

Enables single environment variable to be set to a value that contains commas or other special characters.



Example

The following example sets the language environment configuration for the default listener:

$ srvctl setenv listener -t LANG=en

srvctl setenv nodeapps

Sets the environment variables for the node application configurations.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl setenv nodeapps command as follows:

srvctl setenv nodeapps {-t "name=val[,name=val][...]" | -T "name=val"} [-v]

Table A-97 srvctl setenv nodeapps Options

Options Description
-t "name=val[,name=val] [...]"

Comma-delimited list of name-value pairs of environment variables

-T "name=val"

Enables single environment variable to be set to a value that contains commas or other special characters

-v

Verbose output



Example

To set an environment variable for a node application:

$ srvctl setenv nodeapps -T "CLASSPATH=/usr/local/jdk/jre/rt.jar" -v

srvctl setenv vip

Administers cluster VIP environment configurations.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl setenv vip command with the following syntax:

srvctl setenv vip -i vip_name {-t "name=val[,name=val,...]" | -T "name=val"}

Table A-98 srvctl setenv vip Options

Options Description
-i vip_name

Name of the VIP

-t "name=val,..."

Comma-delimited list of name-value pairs of environment variables

-T "name=val"

Enables single environment variable to be set to a value that contains commas or other special characters



Example

The following example sets the language environment configuration for a cluster VIP:

$ srvctl setenv vip -i crm1-vip -t LANG=en


start

Starts Oracle Restart or Oracle Clusterware enabled, non-running applications for the database, all or named instances, all or named service names, or node-level applications. For the start command, and for other operations that use a connect string, if you do not provide a connect string, SRVCTL uses /as sysdba to perform the operation. To run such operations, the owner of the oracle binary executables must be a member of the OSDBA group, and users running the commands must also be in the OSDBA group.

Table A-99 srvctl start Summary

Command Description

srvctl start asm

Starts Oracle ASM instances

srvctl start database

Starts the cluster database and its instances

srvctl start diskgroup

Starts a specified disk group on a number of nodes

srvctl start eons

Starts the eONS daemon for Oracle Restart

srvctl start filesystem

Starts the Oracle ACFS volume resource

srvctl start gns

Starts GNS

srvctl start home

Starts Oracle Clusterware-managed or Oracle Restart-managed resources in a specific Oracle home

srvctl start instance

Starts the instance

srvctl start listener

Starts the specified listener or listeners

srvctl start nodeapps

Starts the node applications

srvctl start oc4j

Starts the OC4J instance

srvctl start ons

Starts the ONS daemon for Oracle Restart

srvctl start scan

Starts all SCAN VIPs

srvctl start scan_listener

Starts all SCAN listeners

srvctl start service

Starts the service

srvctl start vip

Starts a VIP


srvctl start asm

Starts an Oracle ASM instance.

Notes:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl start asm command with the following syntax:

srvctl start asm [-n node_name] [-o start_options]

Table A-100 srvctl start asm Option

Option Description
-n node_name

Node name

Note: This option is available only with Oracle Clusterware.

-o start_options

Options to startup command, for example OPEN, MOUNT, or NOMOUNT



Examples

An example of this command to start an Oracle ASM instance on a single node of a cluster is:

$ srvctl start asm -n crmnode1

An example to start an Oracle ASM instance on all nodes in the cluster, or for a single-instance database, is:

$ srvctl start asm

srvctl start database

Starts a cluster database and its enabled instances.

Syntax and Options

Use the srvctl start database command with the following syntax:

srvctl start database -d db_unique_name [-o start_options]

Table A-101 srvctl start database Options

Option Description
-d db_unique_name

Unique name for the database

-o start_options

Options for startup command (for example: OPEN, MOUNT, or NOMOUNT)



Example

An example of this command is:

$ srvctl start database -d crm -o open

srvctl start diskgroup

Starts a specific disk group resource on a number of specified nodes.

Syntax and Options

Use the srvctl start diskgroup command with the following syntax:

srvctl start diskgroup -g diskgroup_name [-n node_list]

Table A-102 srvctl start diskgroup Options

Option Description
-g diskgroup_name

The Oracle ASM disk group name

-n node_list

Comma-delimited list of node names on which to start the disk group resource

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl start diskgroup -g diskgroup1 -n mynode1,mynode2

srvctl start eons

Starts the eONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl start eons command with the following syntax:

srvctl start eons [-v]

There is only one option for this command, -v, which is used to indicate that verbose output should be displayed.


srvctl start filesystem

Starts the Oracle ACFS volume resource.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start filesystem command with the following syntax:

srvctl start filesystem -d volume_device_name [-n node_name]

Table A-103 srvctl start filesystem Options

Option Description
-d volume_device_name

The Oracle ACFS volume device name

-n node_name

The name of the node on which the Oracle ACFS volume resource should be started.

If you do not specify this option, then the utility starts the Oracle ACFS volume resource on all the available nodes in the cluster.



srvctl start gns

Starts GNS on a specific node, or all nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start gns command with the following syntax:

srvctl start gns [-l log_level] [-n node_name]

Table A-104 srvctl start gns Options

Option Description
-l log_level

Specify the level of logging with which GNS should run. Log levels vary between 1 (minimal tracing) and 6 (traces everything and is time consuming).

-n node_name

The name of a node in the cluster where you want to start GNS.



srvctl start home

Starts all the Oracle Restart-managed or Oracle Clusterware-managed resources on the specified Oracle home.

Syntax and Options

Use the srvctl start home command with the following syntax:

srvctl start home -o Oracle_home -s state_file [-n node_name]

Table A-105 srvctl start home Options

Option Description
-o Oracle_home

The path to the Oracle home for which you want to start the Oracle Restart or Oracle Clusterware-managed resources

-s state_file

The path name of the state file you specified when you ran either the srvctl stop home or the srvctl status home command.

-n node_name

The name of the node where the Oracle home resides.

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl start -o /u01/app/oracle/product/11.2.0/db_1 -s ~/state.txt

srvctl start instance

Starts instances in the cluster database.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start instance command with the following syntax:

srvctl start instance -d db_unique_name {-n node_name -i "instance_name_list"}
     [-o start_options]

In Windows, you must enclose the list of comma-delimited instance names in double quotation marks ("").

Table A-106 srvctl start instance Options

Option Description
-d db_unique_name

Unique name for the database

-n node_name

The name of a single node

Note: Use this option for policy-managed databases.

-i "instance_name_list"

Specify either exactly one instance name or a comma-delimited list of instance names

Note: Use this option for administrator-managed databases.

-o start_options

Options for startup command (for example: OPEN, MOUNT, or NOMOUNT)



Example

An example of starting an instance for a policy-managed database is:

$ srvctl start instance -d crm -n node2

An example of starting an instance for an administrator-managed database is:

$ srvctl start instance -d crm -i "crm2,crm3"

srvctl start listener

Starts the default listener on the specified node_name, or starts all of the listeners represented in a given list of listener names, that are registered with Oracle Clusterware on the given node.

Syntax and Options

Use the srvctl start listener command with the following syntax:

srvctl start listener [-n node_name] [-l listener_name_list]

Table A-107 srvctl start listener Options

Option Description
-n node_name

Node name

Note: This option is available only with Oracle Clusterware.

-l listener_name_list

Listener name

If you do not specify this option, then the listener name defaults to LISTENER.



Example

An example of this command is:

$ srvctl start listener -n mynode1

srvctl start nodeapps

Starts node-level applications on a node or all nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start nodeapps command with the following syntax:

srvctl start nodeapps [-n node_name] [-v]

Table A-108 srvctl start nodeapps Options

Option Description
-n node_name

Node name

If you do not specify this option, then the utility starts the nodeapps on all active nodes in the cluster.

-v

Verbose output



Example

An example of this command is:

srvctl start nodeapps

srvctl start oc4j

Starts the OC4J instance.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start oc4j command with the following syntax:

srvctl start ocj4 [-v]

There is only one option for this command, -v, which is used to indicate that verbose output should be displayed.


srvctl start ons

Starts the ONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl start ons command with the following syntax:

srvctl start ons [-v]

There is only one option for this command, -v, which is used to indicate that verbose output should be displayed.


srvctl start scan

Starts all SCAN VIPs, by default, or a specific SCAN VIP, on all nodes or a specific node in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start scan command with the following syntax:

srvctl start scan [-i ordinal_number] [-n node_name]

Table A-109 srvctl start scan Options

Option Description
-i ordinal_number

An ordinal number that identifies which SCAN VIP you want to start. The range of values you can specify for this option is 1 to 3.

If you do not specify this option, then the utility starts all the SCAN VIPs.

-n node_name

The name of a single node.

If you do not specify this option, then the utility starts the SCAN VIPs on all nodes in the cluster.



Example

To start the SCAN VIP identified by the ordinal number 1 on the node1 node, use the following command:

$ srvctl start scan -i 1 -n node1

srvctl start scan_listener

Starts all SCAN listeners, by default, or a specific listener on all nodes or a specific node in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start scan_listener command with the following syntax:

srvctl start scan_listener [-n node_name] [-i ordinal_number]

Table A-110 srvctl start scan_listener Options

Option Description
-i ordinal_number

An ordinal number that identifies which SCAN Listener you want to start. The range of values you can specify for this option is 1 to 3.

If you do not specify this option, then the utility starts all the SCAN listeners.

-n node_name

The name of a single node.

If you do not specify this option, then the utility starts the SCAN listeners on all nodes in the cluster.



Example

An example of this command is:

$ srvctl start scan_listener -i 1

srvctl start service

Starts a service or multiple services on the specified instance. The srvctl start service command will fail if you attempt to start a service on an instance if that service is already running on its maximum number of instances, that is, its number of preferred instances. You may move a service or change the status of a service on an instance with the srvctl modify service and srvctl relocate service commands described later in this appendix.

Syntax and Options

Use the srvctl start service command with the following syntax:

srvctl start service -d db_unique_name 
            [-s "service_name_list" [-n node_name | -i instance_name]] 
            [-o start_options]

Table A-111 srvctl start service Options

Option Description
-d db_unique_name

Unique name for the database

-s "service_name_list"

Comma-delimited list of service names.

If you do not include this option, then SRVCTL starts all of the services for the specified database.

-n node_name

The name of the node where the service should be started. Use this option for policy-managed databases.

Note: This option is available only with Oracle Clusterware.

-i instance_name

The name of the instance for which the service should be started. Use this option for administrator-managed databases.

Note: This option is available only with Oracle Clusterware.

-o start_options

Options to startup command (for example: OPEN, MOUNT, or NOMOUNT)



Examples

The following example starts a named service. If the instances that support these services, including available instances that the service uses for failover, are not running but are enabled, then SRVCTL starts them.

$ srvctl start service -d crm -s crm

The following example starts a named service on a specified instance:

$ srvctl start service -d crm -s crm -i crm2

srvctl start vip

Starts a specific VIP or a VIP on a specific node.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start vip command with the following syntax:

srvctl start vip {-n node_name | -i vip_name } [-v]

Table A-112 srvctl start vip Options

Option Description
-n node_name

Node name

-i vip_name

The VIP name

-v

Verbose start



Example

An example of this command is:

$ srvctl start vip -i crm1-vip -v


status

Displays the current state of a named database, instances, services, disk group, listener, node application, or other resource managed by Oracle Clusterware.

Table A-113 srvctl status Summary

Command Description

srvctl status asm

Displays the status of Oracle ASM instances

srvctl status database

Displays the status of a database

srvctl status diskgroup

Displays status of a specific disk group on a number of nodes

srvctl status eons

Displays the status of the eONS daemon

srvctl status filesystem

Displays the status of an Oracle ACFS volume

srvctl status gns

Displays the status of GNS

srvctl status home

Displays the status of the resources associated with the specified Oracle home

srvctl status instance

Displays the status of a instance

srvctl status listener

Displays the status of a listener resource

srvctl status nodeapps

Displays the status of node applications

srvctl status oc4j

Determines which node is running the Oracle QoS Management server

srvctl status ons

Displays the status of ONS

srvctl status scan

Displays the status of SCAN VIPs

srvctl status scan_listener

Displays the status of SCAN listeners

srvctl status server

Displays the status of servers

srvctl status service

Displays the status of services

srvctl status srvpool

Displays the status of server pools

srvctl status vip

Displays the status of VIPs


srvctl status asm

Displays the status of an Oracle ASM instance.

Note:

To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use the SRVCTL binary in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax and Options

Use the srvctl status asm command with the following syntax:

srvctl status asm [-n node_name] [-a]

Table A-114 srvctl status asm Options

Option Description
-n node_name

Node name. If you do not specify this option, the SRVCTL displays the status of all Oracle ASM instances.

Note: This option is available only with Oracle Clusterware.

-a

Print detailed status information



Example

An example of this command is:

$ srvctl status asm -n crmnode1 -a

srvctl status database

Displays the status of instances and their services.

Syntax and Options

Use the srvctl status database command with the following syntax:

srvctl status database -d db_unique_name [-f] [-v]

Table A-115 srvctl status database Options

Option Description
-d db_unique_name

Unique name for the database

-f

Include disabled applications

-v

Verbose output



Example

An example of this command is:

$ srvctl status database -d crm -v

srvctl status diskgroup

Displays the status of a specific disk group on a number of specified nodes.

Syntax and Options

Use the srvctl status diskgroup command with the following syntax:

srvctl status diskgroup -g diskgroup_name [-n node_list] [-a]

Table A-116 srvctl status diskgroup Options

Option Description
-g diskgroup_name

The Oracle ASM disk group name

-n node_list

Comma-delimited list of node names on which to check status of the disk group

Note: This option is available only with Oracle Clusterware.

-a

Display enabled status information of disk group



Example

An example of this command is:

$ srvctl status diskgroup -g diskgroup1 -n mynode1,mynode2 -a

srvctl status eons

Displays the current state of the eONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl status eons command with the following syntax:

srvctl status eons

srvctl status filesystem

Displays the status of the specified Oracle ACFS volume.

Syntax and Options

Use the srvctl status filesystem command with the following syntax:

srvctl status filesystem -d volume_device_name

Table A-117 srvctl status filesystem Options

Option Description
-d volume_device_name

The device name of the Oracle ACFS volume



Example

An example of this command is:

$ srvctl status filesystem -d /dev/asm/racvol_1

srvctl status gns

Displays the current state of GNS.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status gns command with the following syntax:

srvctl status gns [-n node_name]

Table A-118 srvctl status gns Options

Option Description
-n node_name

Specify a node on which GNS is running for which you want to display the state



srvctl status home

Displays the status of all the Oracle Restart-managed or Oracle Clusterware-managed resources for the specified Oracle home.

Syntax and Options

Use the srvctl status home command with the following syntax:

srvctl status home -o Oracle_home -s state_file [-n node_name]

Table A-119 srvctl status home Options

Option Description
-o Oracle_home

The path to the Oracle home for which you want to start the Oracle Restart or Oracle Clusterware-managed resources

-s state_file

The path name the text file that holds the state information generated by this command.

-n node_name

The name of the node where the Oracle home resides.

Note: This option is available only with Oracle Clusterware.



Example

An example of this command is:

$ srvctl status home -o /u01/app/oracle/product/11.2.0/db_1 -s ~/state.txt

srvctl status instance

Displays the status of instances.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status instance command with the following syntax:

srvctl status instance -d db_unique_name {-n node_name | -i "instance_name_list"}
     [-f] [-v]

Table A-120 srvctl status instance Options

Option Description
-d db_unique_name

Unique name for the database

-n node_name

Node name

Note: Use this option for policy-managed databases

-i "instance_name_list"

Comma-delimited list of instance names

Note: Use this option for administrator-managed databases

-f

Include disabled applications

-v

Verbose output



Example

An example of this command is:

$ srvctl status instance -d crm -i "crm1,crm2" -v

srvctl status listener

Displays the status of listener resources.

Syntax and Options

Use the srvctl status listener command with the following syntax:

srvctl status listener [-l listener_name] [-n node_name]

Table A-121 srvctl status listener Options

Option Description
-l listener_name

Name of a listener.

If you do not specify this option, then the listener name defaults to LISTENER

-n node_name

Name of a cluster node.

Note: This option is available only for Oracle Clusterware.



Example

An example of this command is:

$ srvctl status listener -n node2

srvctl status nodeapps

Displays the status of node applications.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status nodeapps command with the following syntax:

srvctl status nodeapps

srvctl status oc4j

Determines which node is running the Oracle QoS Management server.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status oc4j command with the following syntax:

srvctl status oc4j [-n node_name]

The only option available for this command is the -n node_name option, where node_name is the name of a node in the cluster.


srvctl status ons

Displays the current state of the ONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl status ons command with the following syntax:

srvctl status ons

srvctl status scan

Displays the status for all SCAN VIPs, by default, or a specific SCAN VIP.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status scan command with the following syntax:

srvctl status scan [-i ordinal_number]

The only option available for this command is -i, which is an ordinal number that identifies a specific SCAN VIP. The range of values you can specify for this option is 1 to 3. If you do not specify this option, then the utility displays the status of all SCAN VIPs in the cluster.


Example

An example of this command is:

$ srvctl status scan -i 1

srvctl status scan_listener

Displays the status for all SCAN listeners, by default, or a specific listener.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status scan_listener command with the following syntax:

srvctl status scan_listener [-i ordinal_number]

The only option available for this command is -i, which is an ordinal number that identifies a specific SCAN Listener. The range of values you can specify for this option is 1 to 3. If you do not specify this option, then the utility displays the status of all SCAN listeners in the cluster.


Example

An example of this command is:

$ srvctl status scan_listener -i 1

srvctl status server

Displays the current state of named servers.

Syntax and Options

Use the srvctl status server command with the following syntax:

srvctl status server -n "server_name_list" [-a]

Table A-122 srvctl status server Options

Option Description
-n "server_name_list"

Comma-delimited list of server names.

-a

Print detailed status information.



Example

The following example displays the status of a named server:

$ srvctl status server -n server11 -a

srvctl status service

Displays the status of a service.

Syntax and Options

Use the srvctl status service command with the following syntax:

srvctl status service -d db_unique_name [-s "service_name_list"] [-f] [-v]

Table A-123 srvctl status service Options

Option Description
-d db_unique_name

Unique name for the database

-s "service_name_list"

Comma-delimited list of service names.

If you do not specify this option, then the utility lists the status of all the services for the specified database.

-f

Include disabled applications

-v

Verbose output



Example

The following example displays the status of a named service globally across the clustered database:

$ srvctl status service -d crm -s crm -v

srvctl status srvpool

Displays all server pool names and number of servers (and names of servers if you specify the -a option) that are currently assigned to each server pool, if you do not specify the -g option. When you specify the -g option, the command displays the preceding information for the specified server pool.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status srvpool command with the following syntax:

srvctl status srvpool [-g server_pool] [-a]

Table A-124 srvctl status srvpool Options

Option Description
-g server_pool

Name of the server pool

-a

Print detailed status information



Example

An example of this command is:

$ srvctl status srvpool -g srvpool1 -a

srvctl status vip

Displays status for a specific VIP or a VIP on a specific node.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl status vip command with the following syntax:

srvctl status vip {-n node_name | -i vip_name}

Table A-125 srvctl status vip Options

Option Description
-n node_name

Node name

-i vip_name

The VIP name



Example

An example of this command is:

$ srvctl status vip -i node1-vip


stop

Stops the Oracle Clusterware applications for the database, all or named instances, all or named service names, listeners, or node level application resources. Only the Oracle Clusterware applications that are starting or running are stopped. Objects running outside of Oracle Clusterware are not stopped. Stops node-level applications and all dependent Oracle Clusterware applications on the node.

You should disable an object that you intend to remain stopped after you issue a srvctl stop command. See the srvctl disable command starting with srvctl disable database.

Note:

If the object is stopped and is not disabled, then it can restart as a result of another planned operation. The object does not restart as a result of a failure. Oracle recommends that you disable any object that should remain stopped after you issue a stop command.

Table A-126 srvctl stop Summary

Command Description

srvctl stop asm

Stops Oracle ASM instances

srvctl stop database

Stops the cluster database

srvctl stop diskgroup

Stops a specific disk group on a specified number of nodes

srvctl stop eons

Stops the eONS daemon

srvctl stop filesystem

Stops the Oracle ACFS volume resource

srvctl stop gns

Stops GNS

srvctl stop home

Stops the resources for the specified Oracle home

srvctl stop instance

Stops the instance

srvctl stop listener

Stops the specified listener or listeners

srvctl stop nodeapps

Stops the node-level applications

srvctl stop oc4j

Stops the OC4J instance

srvctl stop ons

Stops ONS

srvctl stop scan

Stops all SCAN VIPs

srvctl stop scan_listener

Stops all SCAN listeners

srvctl stop service

Stops the service

srvctl stop vip

Stops VIP resources


srvctl stop asm

Stops an Oracle ASM instance.

Notes:

  • To manage Oracle ASM on Oracle Database 11g release 2 (11.2) installations, use SRVCTL in the Oracle grid infrastructure home for a cluster (Grid home). If you have Oracle RAC or Oracle Database installed, then you cannot use SRVCTL in the database home to manage Oracle ASM.

  • You cannot use this command when OCR is stored in Oracle ASM because it will not stop Oracle ASM. To stop Oracle ASM you must shut down Oracle Clusterware.

Syntax and Options

Use the srvctl stop asm command with the following syntax:

srvctl stop asm [-n node_name] [-o stop_options] [-f]

Table A-127 srvctl stop asm Option

Option Description
-n node_name

The name of the node on which to stop the Oracle ASM instance.

If you do not specify this option, then the utility stops the Oracle ASM instance on every active node in the cluster.

Note: This option is available only with Oracle Clusterware.

-o stop_options

Options for shutdown command, for example, NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

-f

Use this option to stop disk groups, file systems and databases that depend on Oracle ASM



Example

An example of this command is:

$ srvctl stop asm -n crmnode1 -i asm1

srvctl stop database

Stops a database, its instances, and its services. When the database later restarts, services with AUTOMATIC management start automatically but services with MANUAL management policy must be started manually.

Syntax and Options

Use the srvctl stop database command with the following syntax:

srvctl stop database -d db_unique_name [-o stop_options] [-f]

Table A-128 srvctl stop database Options

Option Description
-d db_unique_name

Unique name for the database.

-o stop_options

Use this option to specify shutdown command options (for example: NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT).

-f

This option stops the database, its instances, its services, and any resources that depend on those services



Example

An example of this command is:

$ srvctl stop database -d crm

srvctl stop diskgroup

Stops a specific disk group resource on a number of specified nodes.

Syntax and Options

Use the srvctl stop diskgroup command with the following syntax:

srvctl stop diskgroup -g diskgroup_name [-n node_list] [-f]

Table A-129 srvctl stop diskgroup Options

Option Description
-g diskgroup_name

The Oracle ASM disk group name

-n node_list

Comma-delimited list of node names on which to stop the disk group

Note: This option is available only with Oracle Clusterware.

-f

This option does not stop the databases that depend on the disk group you are stopping, but instead performs a forceful dismount that may cause those databases to fail



Example

An example of this command is:

$ srvctl stop diskgroup -g diskgroup1 -n mynode1,mynode2 -f

srvctl stop eons

Stops the eONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl stop eons command with the following syntax:

srvctl stop eons [-f] [-v]

The only options for this command are the -v option, which specifies that verbose output should be displayed and the -f option, which indicates the daemon should be shut down forcefully, if necessary.


Example

An example of this command is:

srvctl stop eons -f

srvctl stop filesystem

Stops the Oracle ACFS volume resource.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop filesystem command with the following syntax:

srvctl stop filesystem -d volume_device_name [-n node_name] [-f]

Table A-130 srvctl stop filesystem Options

Option Description
-d volume_device_name

The Oracle ACFS volume device name

-n node_name

The name of a node

If you do not specify this option, then the utility stops the volume resource on all active nodes in the cluster.

-f

This option stops the file system and also stops any databases or other resources that depend on this file system.



Example

An example of this command is:

$ srvctl stop filesystem -d /dev/asm/racvol_1 -f

srvctl stop gns

Stops GNS for the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop gns command with the following syntax:

srvctl stop gns [-n node_name [-v] [-f]

Table A-131 srvctl stop gns Options

Option Description
-n node_name

The name of a node on which GNS is running

-v

Verbose output

-f

Force stop



Example

An example of this command is:

$ srvctl stop gns

srvctl stop home

Stops all the Oracle Restart-managed or Oracle Clusterware-managed resources on the specified Oracle home.

Syntax and Options

Use the srvctl stop home command with the following syntax:

srvctl stop home -o Oracle_home -s state_file [-t stop_options] 
                 [-n node_name] [-f]

Table A-132 srvctl stop home Options

Option Description
-o Oracle_home

The path to the Oracle home for which you want to start the Oracle Restart or Oracle Clusterware-managed resources

-s state_file

The path name where you want the state file to be written.

-t stop_options

Shutdown options for the database (for example: NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT)

-n node_name

The name of the node where the Oracle home resides.

Note: This option is available only with Oracle Clusterware.

-f

Stop the resources even if errors are reported.



Example

An example of this command is:

$ srvctl stop -o /u01/app/oracle/product/11.2.0/db_1 -s ~/state.txt

srvctl stop instance

Stops instances and stops any services running on those instances.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop instance command with the following syntax:

srvctl stop instance -d db_unique_name {[-n node_name]|[-i "instance_name_list"]}
     [-o stop_options] [-f]

In Windows, you must enclose the list of comma-delimited instance names in double quotation marks ("").

Table A-133 srvctl stop instance Options

Option Description
-d db_unique_name

Unique name for the database

-n node_name

The name of a single node

Note: Use this option for policy-managed databases.

-i "instance_name"

Comma-delimited instance names enclosed in double quotation marks

Note: Use this option for administrator-managed databases.

-o stop_options

Options for shutdown command (for example: NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT)

-f

This option stops the instance and its running services and any resources that depend on those services.



Example

An example of stopping an instance in a policy-managed database is:

$ srvctl stop instance -d crm -n node1

An example of stopping an instance in an administrator-managed database is:

$ srvctl stop instance -d crm -i crm1

srvctl stop listener

Stops the default listener on the specified node_name, or the listeners represented in a given list of listener names, that are registered with Oracle Clusterware on the given node.

This command can also be used to stop a listener on a single-instance database from the single-instance database home. SRVCTL does not accept the -n option, however, when run from a single-instance database home.

Syntax and Options

Use the srvctl stop listener command with the following syntax:

srvctl stop listener [-n node_name] [-l listener_name_list] [-f]

Table A-134 srvctl stop listener Options

Option Description
-n node_name

The name of a single node on which a particular listener runs.

Note: This option is available only with Oracle Clusterware.

-l listener_name

The name of the listener you want to stop.

If you do not specify this option, then the listener name defaults to LISTENER.

-f

Force stop



Example

An example of this command is:

$ srvctl stop listener -n mynode1

srvctl stop nodeapps

Stops node-level applications on a node in the cluster.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop nodeapps command with the following syntax:

srvctl stop nodeapps [-n node_name] [-r] [-v]

Table A-135 srvctl stop nodeapps Options

Option Description
-n node_name

Node name

If you do not specify this option, then the utility stops the nodeapps on all active nodes in the cluster.

-r

Relocate VIP

Note: If you specify this option, then you must also specify the -n node_name option.

-v

Display verbose output



Example

An example of this command is:

$ srvctl stop nodeapps

srvctl stop oc4j

Stops the OC4J instance.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop oc4j command with the following syntax:

srvctl stop oc4j [-f] [-v]

Table A-136 srvctl stop oc4j Options

Option Description
-f

Force stop of the SCAN Listener.

-v

Display verbose output



Example

An example of this command is:

$ srvctl stop oc4j -f -v

srvctl stop ons

Stops the ONS daemon.

Note:

This command is only available with Oracle Restart.
Syntax and Options

Use the srvctl stop ons command with the following syntax:

srvctl stop ons [-v]

The only option for this command is the -v option, which specifies that verbose output should be displayed.


Example

An example of this command is:

$ srvctl stop ons -v

srvctl stop scan

Stops all SCAN VIPs, by default, or a specific SCAN VIP identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop scan command with the following syntax:

srvctl stop scan [-i ordinal_number] [-f]

Table A-137 srvctl stop scan Options

Option Description
-i ordinal_number

An ordinal number that identifies which SCAN VIP you want to stop. The range of values you can specify for this option is 1 to 3.

If you do not specify this option, then the utility stops all the SCAN VIPs.

-f 

Force stop of the SCAN VIP.



Example

An example of this command is:

$ srvctl stop scan -i 1

srvctl stop scan_listener

Stops all SCAN listeners, by default, or a specific listener identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl start scan_listener command with the following syntax:

srvctl stop scan_listener [-i ordinal_number] [-f]

Table A-138 srvctl stop scan_listener Options

Option Description
-i ordinal_number

An ordinal number that identifies which SCAN listener you want to stop. The range of values you can specify for this option is 1 to 3.

If you do not specify this option, then the utility stops all the SCAN listeners.

-f 

Force stop of the SCAN listener.



Example

An example of this command is:

$ srvctl stop scan_listener -i 1

srvctl stop service

Stops one or more services globally across the cluster database, or on the specified instance.

Syntax and Options

Use the srvctl stop service command with the following syntax:

srvctl stop service -d db_unique_name [-s "service_name_list"
     [-n node_name | -i instance_name] [-f]

In Windows, you must enclose the list of comma-delimited service names in double quotation marks ("").

Table A-139 srvctl stop service Options

Option Description
-d db_unique_name

Unique name for the database

-s service_name_list

Comma-delimited list of service names enclosed in double quotation marks ("").

If you do not provide a service name list, then SRVCTL stops all services on the database.

-n node_name

The name of the node on which the services should be stopped. Use this option for policy-managed databases.

Note: This option is available only with Oracle Clusterware.

-i instance_name

The name of the instance for which the services should be stopped. Use this option for administrator-managed databases.

Note: This option is available only with Oracle Clusterware.

-f

Force SRVCTL to stop the service; this causes SRVCTL to disconnect all of the sessions transactionally, requiring the sessions using the service to reconnect and then connect to another instance.

Note: If you do not specify the -f option, then sessions already connected to this service stay connected, but new sessions cannot be established to the service.



Examples

The following example stops a service globally across a cluster database:

$ srvctl stop service -d crm -s crm

The following example stops a service on a specified instance:

$ srvctl stop  service -d crm -s crm -i crm2

srvctl stop vip

Stops a specific VIP or all VIPs on a specific node, including any VIPs that were relocated due to a failover.

Note:

This command is only available with Oracle Clusterware.
Syntax and Options

Use the srvctl stop vip command with the following syntax:

srvctl stop vip {-n node_name | -i vip_name} [-r] [-v]

Table A-140 srvctl stop vip Options

Option Description
-n node_name

Node name

-i vip_name

The VIP name

-r

Relocate VIP

Note: If you specify this option, you must also specify the -n node_name option.

-v

Verbose output



Example

To stop all the VIPs on mynode1, including any failed-over VIPS, use the following command:

$ srvctl stop vip -n mynode1 -v


unsetenv

The unsetenv command unsets values for the environment in the configuration file. It allows users to administer environment configuration for the objects.

Table A-141 srvctl unsetenv Command Summary

Command Description

srvctl unsetenv asm

Unsets the value for one or more Oracle ASM environment variables

srvctl unsetenv database

Unsets the value for one or more cluster database environment variables

srvctl unsetenv listener

Unsets the value for one or more listener environment variables.

srvctl unsetenv nodeapps

Unsets the value for one or more node application environment variables

srvctl unsetenv vip

Unsets the value for one or more VIP environment variables


srvctl unsetenv asm

Unsets the Oracle ASM environment configurations.

Syntax and Options

Use the srvctl unsetenv asm command as follows:

srvctl unsetenv asm -t "name_list"

Table A-142 srvctl unsetenv asm Options

Options Description
-t "name_list"

Comma-delimited list of the names of environment variables enclosed in double quotation marks ("")



Example

The following example unsets the environment configuration for an Oracle ASM environment variable:

$ srvctl unsetenv asm -t CLASSPATH

srvctl unsetenv database

Unsets the cluster database environment configurations.

Syntax and Options

Use the srvctl unsetenv database command as follows:

srvctl unsetenv database -d db_unique_name -t "name_list"

Table A-143 srvctl unsetenv database Options

Options Description
-d db_unique_name

Unique name for the database

-t "name_list"

Names of environment variables



Example

The following example unsets the environment configuration for a cluster database environment variable:

$ srvctl unsetenv database -d crm -t CLASSPATH

srvctl unsetenv listener

Unsets the environment configuration for a listener.

Syntax and Options

Use the srvctl unsetenv listener command as follows:

srvctl unsetenv listener [-l listener_name] -t "name_list"

Table A-144 srvctl unsetenv listener Options

Options Description
-l listener_name

Name of the listener.

If you do not specify this option, then the name of the listener defaults to LISTENER.

-t "name_list"

Names of environment variables



Example

The following example unsets the environment configuration for the node applications:

$ srvctl unsetenv listener -t "TNS_ADMIN"

srvctl unsetenv nodeapps

Unsets the environment configuration for the node applications.

Syntax and Options

Use the srvctl unsetenv nodeapps command as follows:

srvctl unsetenv nodeapps -t "name_list" [-v]

Table A-145 srvctl unsetenv nodeapps Options

Options Description
-t "name_list"

Names and values of environment variables

-v

Display verbose output



Example

The following example unsets the environment configuration for the node applications:

$ srvctl unsetenv nodeapps -t "test_var1,test_var2"

srvctl unsetenv vip

Unsets the environment configuration for the specified cluster VIP.

Syntax and Options

Use the srvctl unsetenv vip command as follows:

srvctl unsetenv vip -i vip_name -t "name_list" [-v]

Table A-146 srvctl unsetenv vip Options

Options Description
-i vip_name

Name of the cluster VIP

-t "name_list"

Comma-delimited list of the names of environment variables

-v

Verbose output



Example

The following example unsets the CLASSPATH environment variable for a cluster VIP:

$ srvctl unsetenv vip -i crm2-vip -t CLASSPATH