SRVCTL Command Reference

SRVCTL commands, object names, and parameters 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 [parameters]

In SRVCTL syntax:

  • command is a verb such as start, stop, or remove

  • object (also known as a noun) is the target or object on which SRVCTL performs the command, such as database or instance. You can also use object abbreviations.

  • parameters extend the use of a preceding command combination to include additional parameters for the command. For example, the -instances parameter indicates that a comma-delimited list of preferred instance names follows; the -instance parameter only permits one value and not a list of names. Do not use spaces between the items in a comma-delimited list.

Note:

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

Table A-4 Summary of SRVCTL Commands

Command Description

add

Adds node applications, databases, database instances, highly available virtual IPs (HAVIPs), listeners, single client access names (SCANs), server pools, services, or virtual IPs (VIPs).

config

Lists the configuration for node applications, database, HAVIPs, Oracle ASM instance, or services.

srvctl convert database

Converts a database either to or from an Oracle Real Application Clusters One Node (Oracle RAC One Node) database.

disable

Disables the database, database instance, or service.

srvctl downgrade database

Downgrades the database configuration after you manually downgrade the database.

enable

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

srvctl export gns

Exports data that a GNS instance uses to a file either for backup or so that you can move the instance to a new server cluster.

getenv

Displays the environment variable in the configuration for the node applications, database, VIP, listener or Oracle ASM.

srvctl import gns

Imports GNS information from a file.

modify

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

predict

Evaluates the consequences of resource failure.

relocate

Relocates Oracle Flex ASM instances, GNS, HAVIPs, OC4J, SCANs, Oracle RAC One Node databases, servers, and VIPs 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, VIP, listener or Oracle ASM.

start

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

status

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

stop

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

unsetenv

Unsets the environment variable in the configuration for the node applications, database, VIP, listener or Oracle ASM.

update

Modifies a GNS instance.

srvctl upgrade database

Upgrades the configuration to the version of the software on which it is running.

Table A-5 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-5 Object Keywords and Abbreviations

Object Keyword Purpose

Oracle Automatic Storage Management instance

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.

Cluster Verification Utility

cvu

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

Database

database

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, and obtain the status of databases, and also to upgrade, downgrade, and remove database configuration information about databases.

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) and generic file systems.

Grid Naming Service (GNS)

gns

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

High Availability VIP

havip

To add, modify, list the configuration of, enable, disable, stop, start, obtain the status of, relocate, and remove highly available VIPs (HAVIPs) (used for highly available NFS exports)

Home directory (for patching)

home

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

Instance

instance
inst

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

Oracle ASM IOServer

ioserver

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

Listener

listener
lsnr

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

Management database

mgmtdb

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, relocate, and remove the database used by Cluster Health Monitor (CHM)

Management listener

mgmtlsnr

To add, modify, manage environment variables for, list the configuration of, enable, disable, start, stop, obtain the status of, and remove the listener used by CHM

Network

network

To add, modify, list the configuration of, and remove a non-default Network

Note: The node applications object, and the config and modify commands also manage the default network.

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

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

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

server

To obtain the status of and relocate a server in a different server pool.

Server pool

serverpool

(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

Oracle ACFS volume

volume

To list the configuration of, enable, disable, start, stop, obtain the status of, and remove an Oracle ACFS volume