A Server Control Utility Reference

Use the Server Control Utility (SRVCTL) to manage Oracle Real Application Clusters (Oracle RAC) 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 12c 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.

See Also:

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

SRVCTL Usage Information

SRVCTL is installed on each node in a cluster by default. To use SRVCTL, log in to the operating system of a node and enter the SRVCTL command and its parameters in case-sensitive syntax as described in "SRVCTL Command Reference".

  • Only use the version of SRVCTL that is provided with Oracle Database 12c on Oracle RAC databases that are created for or upgraded to Oracle Database 12c. The version of SRVCTL must be the same as the version of the object (listeners, Oracle ASM instances, Oracle RAC databases and their instances, and services) being managed. To ensure the versions are the same release, run SRVCTL commands from the Oracle home of the database or object you are managing.

  • SRVCTL does not support concurrent executions of commands on the same object. Therefore, run only one SRVCTL command at a time for each database, service, or other object.

  • When specifying a comma-delimited list as part of a SRVCTL command, there should not be any spaces between the items in the list. For example:

    srvctl add database -serverpool "serverpool1,serverpool3"
    

    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.

  • 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 backslash (\) symbol.

  • A SRVCTL command that produces no output is a successful command. Not all SRVCTL commands return a message when it completes, successfully. However, if a SRVCTL command fails, then it always returns an error message.

  • You can use the -eval parameter with several SRVCTL commands. This parameter, when you use it, enables you to simulate running a command without making any changes to the system. SRVCTL returns output that informs you what will happen if you run a particular command. For example, to know what might happen if you relocate a server:

    $ srvctl relocate server –servers "rac1" –eval –serverpool pool2
    
    Database db1
         will stop on node rac1
         will start on node rac7
         Service mySrv1
              will stop on node rac1, it will not run on any node
         Service myServ2
              will stop on node rac1
              will start on node rac6
    Server rac1
         will be moved from pool myPoolX to pool pool2
    

    The -eval parameter is available with the following commands:

Specifying Command Parameters as Keywords Instead of Single Letters

Before Oracle Database 12c, the SRVCTL command-line interface used single letter parameters. However, this imposes a limit on the number of unique parameters available for use with SRVCTL commands. SRVCTL command parameters introduced in Oracle Database 12c are full words instead of single letters, such as -multicastport and -subdomain.

To support backward compatibility, you can use a mix of single-letter parameters and new keyword parameters. New parameters introduced with keywords can be used with single letter parameters.

Note:

Starting with Oracle Database 12c, the single letter parameters are deprecated in favor of the keyword parameters to avoid using the same letter to implement different functionality depending on the command.

You can obtain the single-letter equivalents, where applicable, by adding the -compatible parameter after the -help parameter.

Specifying an Input File for SRVCTL Command Parameters

You can specify command parameters in a file rather than directly on the command line. Using a command parameters input file is useful in the following situations:

  • You want to run a command with very long parameter values or a command with numerous parameters

  • You want to bypass shell processing of certain special characters

To specify a command parameters input file, use the -file parameter with a value that is the location of the command parameters file. SRVCTL processes the command parameters from the command parameters file instead of from the command line.

Character Set and Case Sensitivity of SRVCTL Object Values

SRVCTL interacts with many different types of objects. The character set and name length limitations, and whether 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

15 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

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

See Also:

Oracle Clusterware Administration and Deployment Guide for information about administering Oracle Clusterware

Using SRVCTL Help

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

srvctl -help

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

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

When you request online help for a command using -help, SRVCTL prints the full words for each parameter. You can obtain the single-letter equivalents, where applicable, by adding the -compatible parameter after the -help parameter. For example:

$ srvctl config gns -help -compatible

The preceding command prints usage information for the srvctl config gns command, listing all parameters as full words followed by their single-letter equivalents in parentheses, where applicable.

To see the SRVCTL version number enter:

$ srvctl -version

SRVCTL 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 Oracle Grid Infrastructure, then log in as the database software owner (for example, ora_db) to manage databases and log in as the Oracle 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, 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.

For some SRVCTL commands, 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 to run them. In this appendix, those commands are preceded by the root prompt (#) in the command examples.

Additional SRVCTL Topics

  • 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.
  • 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 SRVCTL Subprograms or Commands

A number of SRVCTL commands and parameters have been deprecated in this release:

Single Character Parameters for all SRVCTL Commands

Single-character parameters have been deprecated in Oracle Database 12c. Use the full keyword for each parameter instead. To support older tools and scripts that still use single-character parameters, the current version of SRVCTL supports both single-character parameters and full keyword parameters.

The command reference in this appendix shows the keywords for each SRVCTL command. Table A-2 lists the deprecated single-character parameters.

Table A-2 Deprecated Single-Character Parameters for SRVCTL Commands

Single Letter Long Form Values Description Related Commands
A
address
{VIP_name |
IP}/netmask/
[if1[|if2...]]

VIP address specification for node applications

Node applications, VIP, network, Listener, SCAN VIP, and SCAN listener commands

a
all

 

All resources of that kind

srvctl config database

Common

a
diskgroup
diskgroup_list

Comma-delimited list of Oracle ASM disk groups

Database, instance, Oracle ASM, disk group, and file system commands

a
detail

 

Print detailed configuration information

Common

a
available
available_list

A comma-delimited list of available instances

Service and server pool commands

a
abort
 

Abort failed online relocation

Relocate database

a
viponly

 

Display VIP configuration

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

B
rlbgoal
{NONE|
SERVICE_TIME|
THROUGHPUT}

The runtime load balancing goal of a service

Service and server pool commands

c
currentnode
current_node

Node name from which to relocate the service

Service and server pool commands

c
cardinality
{UNIFORM|
SINGLETON}

Whether the service should run on every active server in the server pool (UNIFORM) or just one server (SINGLETON)

Service and server pool commands

c
dbtype
type

Type of database: Oracle RAC One Node, Oracle RAC, or single instance

Database, instance, Oracle ASM, disk group, and file system commands

d

db or database

db_unique_name

Database unique name

Common

d
device
volume_device

Volume device path

Database, instance, Oracle ASM, disk group, and file system commands

d
domain

 

Display subdomain served by GNS

OC4J, home, CVU, and GNS commands

e
emport
em_port_number

Local listen port for Oracle Enterprise Manager

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

e
failovertype
{NONE|SESSION
BASIC|TRANSACTION}

The failover type for a service

Service and server pool commands

e
server
server_list

Candidate server list for Oracle RAC One Node database

Database, instance, Oracle ASM, disk group, and file system commands

f
force
 

Force remove

Common

g
diskgroup
diskgroup_name

Disk group name

File system, Diskgroup commands

g
gsdonly
 

Display GSD configuration

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

g
serverpool
server_pool_name
server_pool_list

A server pool name

Comma-delimited list of database server pool names

Service and server pool commands

Database, instance, Oracle ASM, disk group, and file system commands

h
help
   

Common

i
importance
number

A number that represents the importance of the server pool

Service and server pool commands

i
instance
instance_name

instance_list

Instance name prefix for administrator-managed Oracle RAC One Node database

A comma-delimited list of instance names

Database, instance, Oracle ASM, disk group, and file system commands

I
ip
ip_address

VIP address on which GNS is to listen

OC4J, home, CVU, and GNS commands

i
oldinst
instance_name

The old instance name

Service and server pool commands

i
scannumber
scan_ordinal
_number

Ordinal number of the IP address for the SCAN

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

i
vip
vip_name or 
"vip_name_list"

VIP names

Node applications, GNS, VIP, network, listener, SCAN VIP, and SCAN listener commands

j
acfspath
acfs_path_list

Comma-delimited list of Oracle ACFS paths where the dependency on the database will be set

Database, instance, Oracle ASM, disk group, and file system commands

j
clbgoal
{SHORT|LONG}

The connection load balancing goal for a service

Service and server pool commands

k
netnum
network_number

The network number

Service and server pool commands

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

OC4J, home, CVU, and GNS commands

l
list

 

List all records in GNS

OC4J, home, CVU, and GNS commands

l
listener

listener_name

The name of a listener

ASM commands

l
loglevel
log_level

Specify the level (0-6) of logging that GNS should run with

OC4J, home, CVU, and GNS commands

l
min
number

The minimum size of the server pool

Service and server pool commands

l
onslocalport
port_number

Oracle Notification Service listening port for local client connections

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

l
role
service_role

Comma-delimited list of server roles within double quotation marks (""), where each role is one of PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, or SNAPSHOT_STANDBY

Service and server pool commands

m
domain
domain_name

The domain for the database

Database, instance, Oracle ASM, disk group, and file system commands

m

failovermethod
{NONE|BASIC}

The failover method of a service

Service and server pool commands

m
multicastpost

 

The port on which the GNS daemon is listening for multicast requests

OC4J, home, CVU, and GNS commands

m
path
mountpoint_path

Mountpoint path

Database, instance, Oracle ASM, disk group, and file system commands

n
name

 

Advertise a name through GNS using the given address

OC4J, home, CVU, and GNS commands

n
node
node_name

The name of a specific node

Common

n
nodes
node_list

A comma-delimited list of node names

File system commands

n
dbname
database_name

The database name (DB_NAME), if different from the unique name specified by the -db parameter

Database, instance, Oracle ASM, disk group, and file system commands

n
scanname
scan_name

Fully-qualified SCAN name (includes the domain)

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

n
servers
server_list

A comma-delimited list of candidate server names

Service and server pool commands

n
targetnode
node_name

Node name to which to relocate the service

Service and server pool commands

o
oraclehome
oracle_home

$ORACLE_HOME path

Database commands

p
endpoints
[TCP:]port
_number[/IPC:
key][/NMP:pipe
_name][/TCPS:
s_port][/SDP:
port]

SCAN listener endpoints

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

p
port

 

The port which the GNS daemon uses to communicate with the DNS server

OC4J, home, CVU, and GNS commands

p
rmiport
port_number

OC4J RMI port number

OC4J, home, CVU, and GNS commands

P
tafpolicy
{NONE|BASIC}

TAF policy specification

Service and server pool commands

p
spfile
spfile_location

Server parameter file path

Database, instance, Oracle ASM, disk group, and file system commands

q
notification
{TRUE|FALSE}

Whether FAN is enabled for OCI connections

Service commands

q
query

 

Query GNS for the records belonging to a name

OC4J, home, CVU, and GNS commands

r
preferred
preferred_list

A comma-delimited list of preferred instances

Service and server pool commands

r
onsremoteport
port_number

Oracle Notification Service listening port for connections from remote hosts

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

r
relocate

 

Relocate the VIP

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

r
revert
 

Remove target node of failed online relocation request from the candidate server list of administrator-managed Oracle RAC One Node database

Relocate database

r
role
role_type

Role of the standby database: PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, or SNAPSHOT_STANDBY

Database, instance, Oracle ASM, disk group, and file system commands

s
onsonly

 

Display Oracle Notification Service daemon configuration

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

s
skip
 

Skip checking the ports

Listener, SCAN, and SCAN listener.

s
statfile
file_name

The file path of the state_file created by a previously executed srvctl stop home command

OC4J, home, CVU, and GNS commands

s
status

 

Display the status of GNS

OC4J, home, CVU, and GNS commands

S
subnet
subnet/net
_mask/[if1[|
if2...]]

Network address specification for a network

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

s
service
service_name

service_name_list

The name of a service

A comma-delimited list of service names

Service and server pool commands

s
startoption
start_options

Startup options for the database (mount, open, read only)

Database, instance, Oracle ASM, disk group, and file system commands

t
checkinterval
time_interval

Interval in minutes between checks

OC4J, home, CVU, and GNS commands

t
edition
edition_name

The initial session edition of a service

Service and server pool commands

t
envs
"name_list"

A list of environment variables

Common

t
namevals
"name=
value,..."

Names and values of environment variables

Common

T
nameval
"name=value"

Name and value of a single environment variable

Common

t
update
instance_name

The new instance name

Service and server pool commands

t
remoteservers
host_name[:
port_number]
[,host_name[:
port_number]...]

List of remote host name and port number pairs for Oracle Notification Service daemons outside this cluster

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

t
stopoption
stop_options

Stop options for the database (NORMAL, TRANSACTIONAL, IMMEDITATE, or ABORT)

Database, instance, Oracle ASM, disk group, and file system commands

t
toversion
target_version

Version to which you are downgrading

Database, instance, Oracle ASM, disk group, and file system commands

u
max
number

Maximum size of the server pool

Service and server pool commands

u
nettype
network_type

The network server type, which can be STATIC, DHCP, or MIXED

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

u
newinst
 

Add a new instance to the service configuration

Service commands

u
update

 

Update SCAN listeners to match the number of SCAN VIPs

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

u
user
oracle_user

Oracle user or other authorized user to mount and unmount file systems

Database, instance, Oracle ASM, disk group, and file system commands

v
verbose

 

Verbose output

Common

v
volume
volume_name

Name of a volume

Database, instance, Oracle ASM, disk group, and file system commands

V
versions

 

 

Common

w
failoverdelay
number

Failover delay

Service and server pool commands

w
nettype
network_type

The network server type, which can be STATIC, DHCP, or MIXED

Node applications, VIP, network, listener, SCAN VIP, and SCAN listener commands

w
timeout
timeout

Online relocation timeout in minutes

Database, instance, Oracle ASM, disk group, and file system commands

x
dtp
{TRUE | FALSE}

Whether to enable distributed transaction processing

Service and server pool commands

x
node
node_name

Node name (use this parameter only with noncluster databases)

Common

y
noprompt

 

Suppress the confirmation prompt

Common

y
policy
{AUTOMATIC | MANUAL}

Management policy for the resource

Database, instance, Oracle ASM, disk group, file system, service and server pool commands

z
failoverretry
number

Number of failover retries

Service and server pool commands

z
rmdepondisk

 

To remove a database's dependency upon disk groups

Database, instance, Oracle ASM, disk group, and file system commands


Miscellaneous SRVCTL Commands and Parameters

The following command parameters have been deprecated in this release:

Table A-3 Deprecated Commands and Parameters for SRVCTL

Command Deprecated Parameters
srvctl modify asm

-node node_name

srvctl modify instance

-z

Instead, use the -node option with the value set to ""

srvctl modify gns

[-ip ip_address] [-advertise host_name -address address] [-delete host_name -address address] [-createalias name -alias alias] [-deletealias alias]

Use the srvctl update gns command instead.


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.

 

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


add

The srvctl add command adds the configuration and the Oracle Clusterware applications to 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 -instance must match the ORACLE_SID parameter. The database name given with -database 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 -domain db_domain must match the DB_DOMAIN setting.

Table A-6 srvctl add Command Summary

Command Description

srvctl add cvu

Adds the Cluster Verification Utility resource to an Oracle Clusterware configuration

srvctl add database

Adds a database and configuration

srvctl add havip

Adds a highly available VIP to a cluster.

 

srvctl add instance

Adds one or more instance and configuration

srvctl add listener

Adds a listener to the node

srvctl add network

Adds a DHCP or static network

srvctl add nodeapps

Adds node applications

srvctl add oc4j

Adds OC4J instances

srvctl add ons

Adds Oracle Notification Service 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 cvu

Adds the Cluster Verification Utility (CVU) to an Oracle Clusterware configuration.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add cvu command with the following syntax:

srvctl add cvu [-checkinterval time_in_minutes]

Table A-7 srvctl add cvu Parameters

Parameter Description
-checkinterval time_in_minutes

By default, CVU runs once every 6 hours and verifies the health of cluster. The shortest interval you can specify for CVU check is 10 minutes.


Usage Notes

  • Run this command while logged in as the Grid home user.

Examples

To add CVU with a check interval of 6 hours, use the following command:

$ srvctl add cvu -checkinterval 360

srvctl add database

Adds a database configuration to Oracle Clusterware.

Syntax and Parameters

Use the srvctl add database command with the following syntax:

srvctl add database -db db_unique_name [-eval] 
     -oraclehome oracle_home [-node node_name] [-domain domain_name] 
     [-spfile spfile] [-pwfile password_file_path]
     [-dbtype  {RACONENODE | RAC | SINGLE} [-server "server_list"] 
     [-instance instance_name] [-timeout timeout]]
     [-role {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY"]
     [-startoption start_options] [-stopoption stop_options] [-dbname db_name]  
     [-acfspath "acfs_path_list"] [-policy {AUTOMATIC | MANUAL | NORESTART}]
     [-serverpool "server_pool_list" [-pqpool "pq_pool_list"]]
     [-diskgroup "disk_group_list"] [-verbose]

Table A-8 srvctl add database Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

Note: You can only use this parameter with a policy-managed database.

-oraclehome oracle_home

The path for the Oracle database home directory.

-node node_name

Node name on which you want to register a noncluster, or single instance, Oracle database.

Note: This parameter can be used only with Oracle Clusterware and can be used with the -serverpool parameter to create a policy-managed, noncluster database.

-domain db_domain

The domain for the database

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

-spfile spfile

The path name of the database server parameter file.

-pwfile password_file_path

Enter the full path to the location of the password file.

-dbtype {RACONENODE | RAC | SINGLE}

The type of database you are adding: Oracle RAC One Node, Oracle RAC, or single instance. The default is RAC unless you specify the -node node_name parameter, and the -type parameter defaults to SINGLE.

-server server_list

List candidate servers for Oracle RAC One Node databases.

Notes: You can use this parameter only with administrator-managed Oracle RAC One Node databases. If your Oracle RAC One Node database is policy managed, you cannot use this parameter.

-instance instance_name

Instance name prefix for Oracle RAC One Node databases. The default value for this parameter is the first 12 characters of the global unique name of the database.

Notes: You can use this parameter only with administrator-managed Oracle RAC One Node databases. If your Oracle RAC One Node database is policy managed, you cannot use this parameter.

-timeout timeout

Online database relocation timeout, in minutes, for Oracle RAC One Node databases. The default is 30.

-role {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

-startoption start_options

Startup options for the database, such as OPEN, MOUNT, and NOMOUNT. The default value is OPEN.

Notes:

  • For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

  • When performing a switchover in an Oracle Data Guard configuration, the -startoption for a standby database that becomes a primary database is always set to OPEN after the switchover.

See Also: SQL*Plus User's Guide and Reference for more information about startup options

-stoption stop_options

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

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-dbname db_name

The name of the database, if it is different from the unique name given by the -db parameter

-acfspath "acfs_path_list"

A single Oracle ACFS path or a comma-delimited list of Oracle ACFS paths enclosed in double quotation marks ("") where the database's dependency is set.

Use this parameter to create dependencies on Oracle ACFS file systems other than ORACLE_HOME, such as for when the database uses ORACLE_BASE on a file system that is different from the ORACLE_HOME file system.

-policy {AUTOMATIC | MANUAL | NORESTART}

Management policy for the database.

  • AUTOMATIC (default): The database is automatically restored to its previous running condition (started or stopped) upon restart of the database host computer.

  • MANUAL: The database is never automatically restarted upon restart of the database host computer. A MANUAL setting does not prevent Oracle Clusterware from monitoring the database while it is running and restarting it if a failure occurs.

  • NORESTART: Similar to the MANUAL setting, the database is never automatically restarted upon restart of the database host computer. A NORESTART setting, however, never restarts the database even if a failure occurs.

-serverpool "server_pool_list"
[-pqpool "pq_pool_list"]]

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

You can optionally also specify a comma-delimited list of parallel query server pool names to be used by the database.

Notes:

  • This parameter can only be used with Oracle Clusterware. You can use this parameter with the -node parameter but the server pool must have MAX_SIZE=1 and exactly one configured server (the one you specify in -node).

  • After you add server pools, you can assign services to them using the srvctl add service command.

-diskgroup "disk_group_list"

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


Examples

An example of this command to add a policy-managed Oracle RAC database is:

srvctl add database -db crm -oraclehome /u01/oracle/product/12c/mydb 
    -domain example.com -spfile +diskgroup1/crm/spfilecrm.ora 
    -role PHYSICAL_STANDBY -startoption MOUNT -dbtype RAC -dbname crm_psd 
    -policy MANUAL -serverpool "svrpool1,svrpool2" -diskgroup "dgrp1,dgrp2"

An example of this command to add an administrator-managed database is:

srvctl add database -db crm -oraclehome /u01/oracle/product/12c/mydb 
-domain example.com

srvctl add havip

Adds highly available VIPs (HAVIPs) (used for highly available NFS exports) to a cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add havip command with the following syntax:

srvctl add havip -id id -address {host_name | ip_address}
    [-netnum network_number] [-description text] [-skip] [-homenode node_name]

Table A-9 srvctl add havip Parameters

Parameter Description
-id havip_name

Specify a unique ID for the HAVIP resource.

-address {host_name |ip_address}

Specify either a host name or an IPv4 IP address for the HAVIP you are going to create.

Note: You must configure the IPv4 IP address with a non-DHCP, non-round robin DNS address.

-netnum network_number

Optionally, you can specify a network resource upon which the HAVIP depends. The default value for this parameter is 1.

-description text

Optionally, you can specify a text description of the HAVIP.

-skip

Optionally, you can specify this parameter to skip the reachability check for the IP address.

-homenode node_name

Optionally, you can specify a preferred node or an empty string to clear the home node.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

  • The address for the HAVIP must be in the same subnet as the network on which it is created.

  • Oracle does not support using IPv6 addresses.

Example

An example of this command is:

# srvctl add havip -id myhavip -address 192.0.2.1 -netnum 2 -description
    "My HA VIP" -skip -homenode myNode2

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.

Notes:

  • This command increments the CARDINALITY resource attribute.

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

  • If you attempt to use this command on an Oracle RAC One Node database, then the command returns an error stating you must convert the database to Oracle RAC.

Syntax and Parameters

Use the srvctl add instance command with the following syntax:

srvctl add instance -db db_unique_name -instance instance_name
     -node node_name [-force]

Table A-10 srvctl add instance Parameters

Parameter Description
-db db_unique_name

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

-instance instance_name

The name of the instance you are adding

-node node_name

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

-force

Optionally, you can force the add operation, even though some resources will be stopped.


Examples

Examples of this command are:

$ srvctl add instance -db crm -instance crm01 -node gm01
$ srvctl add instance -db crm -instance crm02 -node gm02
$ srvctl add instance -db crm -instance crm03 -node gm03

srvctl add listener

Adds a listener to every node in a cluster.

Syntax and Parameters

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

To create an Oracle Database listener:

srvctl add listener [-listener listener_name] [-netnum network_number]
  [-oraclehome Oracle_home] -user user_name [-endpoints "[TCP:]port_list[/IPC:key]
  [/NMP:pipe_name][/TCPS:s_port][/SDP:port]"] [-skip]

To create an Oracle ASM listener:

srvctl add listener [-listener listener_name] -asmlistener [-subnet subnet]
 [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]
 [-skip]

To create a Leaf listener:

srvctl add listener [-listener listener_name] -leaflistener [-subnet subnet]
 [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]
 [-skip]

To create a SCAN listener, use the srvctl add scan_listener command. To create a management listener (for the CHM repository), use the srvctl add mgmtlsnr command.

Table A-11 srvctl add listener Parameters

Parameter Description
-listener listener_name

Specify a listener name. This parameter is optional.

If you do not specify this parameter, then the name of the listener defaults to LISTENER for a database listener, LISTENER_ASM for an Oracle ASM listener, and LISTENER_LEAF for a Leaf Node listener.

-netnum 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.

Note: Use this parameter when you add an Oracle Database listener.

-oraclehome oracle_home

Specify an Oracle home for the cluster database. If you do not include this parameter, then SRVCTL uses the Grid home by default.

Note: Use this parameter when you add an Oracle Database listener.

-user user_name

Use this parameter to set the user that will run the listener to a less privileged user. Oracle recommends using this parameter to increase security.

Notes:

  • You must be logged in as root to run this command and specify the -user parameter.

  • Use this parameter when you add an Oracle Database listener.

  • When you use the -user parameter, ensure the following:

    The listener log directory in ORACLE_BASE and the Grid_home/network/admin/user_name directory must both exist on each node before you can use this parameter. Additionally, user_name must have read, write, and execute permission in the directory.

    The ORACLE_HOME/network/admin/endpoints_listener.ora file exists and user_name has read and write permission on it.

    The $ORACLE_BASE/diag/tnslsnr/host_name/lower_case_listener_name directory exists and user_name has read, write, and execute permission on it.

-endpoints "[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 you do not specify the -endpoints parameter for an Oracle Database listener, then SRVCTL searches for a free port between 1521 and 1540.

Note: You can modify this attribute using Online Resource Attribute Modification.

-skip

Indicates you want to skip the checking of ports.

-asmlistener

Specifies the listener type as an Oracle ASM listener. If you do not specify the -listener parameter, then the name of the Oracle ASM listener defaults to LISTENER_ASM.

Note: You can only use this parameter with Oracle Clusterware.

-leaflistener

Specifies the listener type is a Leaf Node listener. If you do not specify the -listener parameter, then the name of the Leaf Node listener defaults to LISTENER_LEAF.

Note: You can only use this parameter with Oracle Clusterware.

-subnet subnet

Specifies the subnet to use for an Oracle ASM or Leaf Node listener.

Note: You can only use this parameter with Oracle Clusterware.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms when you specify the -user parameter.

Example

The following command adds a listener named listener112 that is listening on ports 1341, 1342, and 1345 and runs from the Oracle home directory on every node in the cluster:

$ srvctl add listener -listener listener112 -endpoints "1341,1342,1345" 
-oraclehome /u01/app/oracle/product/12.1.0/db1

srvctl add mgmtlsnr

Adds a management listener resource (for CHM) to the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add mgmtlsnr command with the following syntax:

srvctl add mgmtlsnr [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name]
 [/TCPS:s_port][/SDP:port]"] [-skip]

Table A-12 srvctl add mgmtlsnr Parameters

Parameter Description
-endpoints "[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.

Note: You can modify this attribute using Online Resource Attribute Modification.

-skip

Indicates you want to skip the checking of ports.


Example

The following command adds a management listener that is listening on port 1341 to the cluster:

$ srvctl add mgmtlsnr -endpoints "TCP:1341"

srvctl add network

Adds a static or dynamic network. If your server connects to more than one network, then you can use this command to configure an additional network interface for Oracle RAC, allowing you to create VIPs on multiple public networks. You can also use the LISTENER_NETWORKS database initialization parameter to control client redirects to the appropriate network

Notes:

  • This command is only available with Oracle Clusterware.

  • Oracle only supports DHCP-assigned networks for the default network, not for subsequent networks.

Syntax and Parameters

Use the srvctl add network command with the following syntax:

srvctl add network [-netnum net_number] -subnet subnet/netmask[/if1[|if2|...]]
   [-nettype {static | dhcp | autoconfig | mixed}]
   [-leaf] [-pingtarget "ping_target_list"] [-verbose]

Table A-13 srvctl add network Parameters

Parameter Description
-netnum net_number

Specify a network number. The default is 1.

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

Defines a subnet. If you do not specify any interface names, then the network uses any interface on the given subnet.

For IPv6, netmask is a prefix length, such as 64.

-nettype {static|dhcp|autoconfig|mixed}

Specify the network type: static, dhcp, autoconfig, or mixed.

If you specify static for the network type, then you must provide the virtual IP address using the srvctl add vip command.

If you specify dhcp for the network type, then the VIP agent obtains the IP address from a DHCP server.

If you specify autoconfig for the network type, then the VIP agent generates a stateless IPv6 address for the network. You can only use autoconfig for IPv6 networks. If the subnet/netmask specification is not for an IPv6 address, then SRVCTL returns an error.

If you specify mixed for the network type, then the VIP resource uses both a static IP address and an IP address obtained dynamically, either from a DHCP server for IPv4 or using stateless autoconfiguration for IPv6.

-leaf

Specify the -leaf parameter when you want to create an application VIP network resource that runs only on Leaf Nodes and is used by application VIPs.

[-pingtarget "ping_target_list"]

Specify a comma-delimited list of IP addresses or host names to ping.

-verbose

Verbose output.


Usage Notes

  • 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 network -netnum 3 -subnet 192.168.3.0/255.255.255.0

srvctl add nodeapps

Adds a node application configuration to the specified node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add nodeapps command with one the following syntax models, specifying either a specific node and VIP or a specific subnet and netmask:

srvctl add nodeapps {-node node_name -address {vip_name | ip_address}/netmask[/if1[|if2|..]] [-skip]}
    [-emport em_port] [-onslocalport ons_local_port] 
    [-onsremoteport ons_remote_port] [-onshostport hostname_port_list]
    [-remoteservers hostname_port_list [-verbose]
 
srvctl add nodeapps -subnet subnet/netmask[/if1[|if2|...]] [-emport em_port]
    [-onslocalport ons_local_port] [-onsremoteport ons_remote_port]
    [-onshostport hostname_port_list] [-remoteservers hostname_port_list] 
    [-verbose]

Table A-14 srvctl add nodeapps Parameters

Parameter Description
-node 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.

-address {vip_name | ip_addr}
/netmask[/if1
[|if2|...]]

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

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

-skip

Specify this parameter to skip checking the reachability of the VIP address.

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

Creates a DHCP subnet. If you do not specify any interface names, then the VIPs use any interface on the given subnet.

-emport em_port

Local port on which Oracle Enterprise Manager listens. The default port is 2016.

-onslocalport ons_local_port

The Oracle Notification Service daemon listener port on its node.

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

Note: The local port and remote port must each be unique.

-onsremoteport ons_remote_port

The port number for remote Oracle Notification Service daemon connections.

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

Note: The local port and remote port must each be unique.

-onshostport host_port_list

A list of host[:port] pairs of remote hosts that are part of the Oracle Notification Service 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.

-remoteservers host_port_list

A list of host[:port] pairs for Oracle Notification Service daemons on servers that are not in the cluster.

-verbose

Verbose output


Usage Notes

  • 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 -node crmnode1 -address 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 Parameters

srvctl add oc4j [-verbose]

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

Example

An example of this command is:

srvctl add oc4j

srvctl add ons

Adds an Oracle Notification Service daemon to an Oracle Restart configuration.

Note:

This command is only available with Oracle Restart.

Syntax and parameters

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

Table A-15 srvctl add ons Parameters

Parameter Description
-l ons_local_port

The Oracle Notification Service daemon listening port for local client connections

Note: The local port and remote port must each be unique.

-r ons_remote_port

The Oracle Notification Service daemon listening port for connections from remote hosts

Note: The local port and remote port must each be unique.

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

A list of comma-delimited host:port pairs of remote hosts that are part of the Oracle Notification Service 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 dynamic network and Oracle GNS configuration. For static networks, the addresses to which the SCAN resolves in DNS must match the address type of the subnet. For an IPv4 network, the SCAN must resolve to IPv4 addresses.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add scan command with the following syntax:

srvctl add scan -scanname scan_name [-netnum network_number]

Table A-16 srvctl add scan Parameters

Parameter Description
-scanname scan_name

A fully-qualified host name, which includes the domain name. If the network is dynamic, then you do not have to use fully-qualified host name but, if you choose to do so, then the domain must be the GNS subdomain.

Note: You can modify this attribute using Online Resource Attribute Modification.

-netnum network_number

The optional network number from which SCAN VIPs are obtained. If you do not specify this parameter, then the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.


Example

An example of this command is:

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

srvctl add scan_listener

Adds Oracle Clusterware resources for 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 Parameters

Use the srvctl add scan_listener command with the following syntax:

srvctl add scan_listener [-listener lsnr_name_prefix] [-skip] [-netnum network_number]
 [-enpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]
 [-invitednodes node_list] [-invitedsubnets subnet_list]

Table A-17 srvctl add scan_listener Parameters

Parameter Description
-listener lsnr_name_prefix

The SCAN listener name prefix.

-skip

Use this parameter to skip checking of the ports.

-netnum network_number

The optional network number from which SCAN VIPs are obtained. If you do not specify this parameter, then the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.

-endpoints "[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 parameter is not specified, then the default TCP port of 1521 is used.

Note: You can modify this attribute using Online Resource Attribute Modification.

-invitednodes node_list

Use this parameter to specify a comma-delimited list of host names from outside the cluster that are allowed to register with the SCAN listener.

-invitedsubnets subnet_list

Use this parameter to specify a comma-delimited list of subnets from outside the cluster that are allowed to register with the SCAN listener.


Example

An example of this command is:

# srvctl add scan_listener -listener 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.

Note:

The srvctl add service command does not accept placement parameters for Oracle RAC One Node databases.

Syntax and Parameters

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

To add a service to a policy-managed database:

srvctl add service -db db_unique_name -service service_name [-eval] 
   -serverpool server_pool [-cardinality {UNIFORM | SINGLETON}] 
   [-edition edition_name] [-netnum network_number]
   [-role "[PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"
   [-policy {AUTOMATIC | MANUAL}] [-notification {TRUE | FALSE}] 
   [-clbgoal {SHORT | LONG}] [-failovertype {NONE|SESSION|SELECT|TRANSACTION}]
   [-rlbgoal {NONE | SERVICE_TIME | THROUGHPUT}] [-dtp {TRUE | FALSE}]
   [-failovermethod {NONE | BASIC}] [-failoverretry failover_retries]
   [-failoverdelay failover_delay] [-pdb pluggable_database] 
   [-sql_translation_profile sql_translation_profile] 
   [-global {TRUE | FALSE}] [-maxlag max_lag_time] [-commit_outcome {TRUE|FALSE}]
   [-retention retention_time] [-replay_init_time replay_initiation_time]
   [-session_state {STATIC | DYNAMIC}] [-pqservice pq_service] 
   [-pqpool pq_pool_list] [-force]

To add a service to an administrator-managed database:

srvctl add service -database db_unique_name -service service_name [-eval]
   -preferred preferred_list -available available_list] [-netnum network_number]
   [-tafpolicy {BASIC | NONE | PRECONNECT}] [-edition edition_name]
   [-role "[PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"
   [-policy {AUTOMATIC | MANUAL}] [-notification {TRUE | FALSE}] 
   [-clbgoal {SHORT | LONG}] [-failovertype {NONE|SESSION|SELECT|TRANSACTION}]
   [-rlbgoal {NONE | SERVICE_TIME | THROUGHPUT}] [-dtp {TRUE | FALSE}]
   [-failovermethod {NONE | BASIC}] [-failoverretry failover_retries]
   [-failoverdelay failover_delay] [-pdb pluggable_database] 
   [-sql_translation_profile sql_translation_profile] 
   [-global {TRUE | FALSE}] [-maxlag max_lag_time] [-commit_outcome {TRUE|FALSE}]
   [-retention retention_time] [-replay_init_time replay_initiation_time]
   [-session_state {STATIC|DYNAMIC}] [-pqservice pq_service] 
   [-pqpool pq_pool_list] [-force] [-verbose]

To update the preferred and available lists of an existing service:

srvctl add service -db db_unique_name -service service_name 
   -update {-prefered preferred_list | -available available_list} [-force] 
   [-verbose]

Table A-18 lists and describes all the srvctl add service parameters and whether they can be used when adding a service to either an Oracle RAC database or noncluster database.

Table A-18 srvctl add service Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-service service_name

The service_name.service_domain should be unique within the cluster unless you want to spread connections across multiple databases that offer the same service. If you do not specify the service domain as part of the service name (such as sales.example.com), then the DB_DOMAIN database attribute is appended to the service name.

Note: The -service parameter has a 4 kilobyte (KB) limit for its value. Therefore, the total length of the names of all services assigned to an instance cannot exceed 4 KB.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

Note: You can only use this parameter with a policy-managed service.

-edition edition_name

The initial session edition of the service.

When an edition is specified for a service, all subsequent connections that specify the service use this edition as the initial session edition. However, if a session connection specifies a different edition, then the edition specified in the session connection is used for the initial session edition.

SRVCTL does not validate the specified edition name. During connection, the connect user must have USE privilege on the specified edition. If the edition does not exist or if the connect user does not have USE privilege on the specified edition, then an error is raised.

-sql_translation_profile
 profile_name

Use this parameter to specify a SQL translation profile for a service that you are adding after you have migrated applications from a non-Oracle database to an Oracle database.

This parameter corresponds to the SQL translation profile parameter in the DBMS_SERVICE service attribute.

Notes:

  • Before using the SQL translation feature, you must migrate all server-side application objects and data to the Oracle database.

  • Use the srvctl config service command to display the SQL translation profile.

See Also: Oracle Database Migration Guide for more information about SQL translation

-preferred preferred_list

A list of preferred instances on which the service runs when the database is administrator managed.

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

Note: This parameter can be used only with Oracle RAC and only for administrator-managed databases.

-available available_list

A list of available instances to which the service fails over when the database is administrator managed.

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

Note: This parameter can be used only with Oracle RAC and only for administrator-managed databases.

-serverpool server_pool

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

Note: This parameter can be used only with Oracle RAC and only for policy-managed databases.

-cardinality {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).

Notes:

  • This parameter can be used only with Oracle RAC and only for policy-managed databases.

  • For policy-managed Oracle RAC One Node databases, all services must be SINGLETON.

-netnum network_number

Use this parameter to determine on which network this service is offered. The service is configured to depend on VIPs from the specified network.

Note: This parameter can be used only with Oracle RAC and Oracle RAC One Node database configurations.

-tafpolicy {BASIC | NONE
 | PRECONNECT}

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

Note: You can only use PRECONNECT when you specify the -preferred and -available parameters.

-role "[PRIMARY][,PHYSICAL_STANDBY]
[,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"

The service role. You can specify one or more roles in a comma-delimited list.

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

Using SRVCTL to manually start a service is not affected by the service role.

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

-policy {AUTOMATIC | MANUAL}

Service management policy.

If AUTOMATIC (the default), then the service is automatically started upon restart of the database, either by a planned restart (with SRVCTL) or after a failure. Automatic restart is also subject to the service role, however (the -role parameter).

If MANUAL, then the service is never automatically restarted upon planned restart of the database (with SRVCTL). A MANUAL setting does not prevent Oracle Clusterware from monitoring the service when it is running and restarting it if a failure occurs.

Note: Using CRSCTL to stop and start the Oracle Clusterware restarts the service in the same way that a failure does.

-notification {TRUE | FALSE}

Enable Fast Application Notification (FAN) for OCI connections.

-dtp {TRUE | FALSE}

Indicates whether 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 parameter can be used only with Oracle RAC.

-clbgoal {SHORT | LONG}

Connection Load Balancing Goal. Use a value of SHORT for this parameter for run-time load balancing, or if using an integrated connection pool. Use a value of LONG for this parameter for long running connections, such as batch jobs, that you want balanced by the number of sessions per node for the service.

-rlbgoal {NONE |
 SERVICE_TIME | THROUGHPUT}

Runtime Load Balancing Goal (for the Load Balancing Advisory). Set this parameter to SERVICE_TIME to balance connections by response time. Set this parameter to THROUGHPUT to balance connections by throughput.

-failovertype {NONE | SESSION |
 SELECT | TRANSACTION}

Failover type.

To enable Application Continuity for Java, set this parameter to TRANSACTION. To enable TAF for OCI, set this parameter to SELECT or SESSION.

Note: If you set -failovertype to TRANSACTION, then you must set -commit_outcome to TRUE.

-failovermethod {NONE | BASIC}

TAF failover method (for backward compatibility only).

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

Note: This parameter can be used only with Oracle RAC.

-failoverretry failover_retries

For Application Continuity and TAF, this parameter determines the number of attempts to connect after an incident.

-failoverdelay failover_delay

For Application Continuity and TAF, this parameter specifies the time delay (in seconds) between reconnect attempts per incident at failover.

-pdb pluggable_database

The name of the pluggable database (PDB).

Note: You can specify a PDB property when you create or modify a service. The PDB property associates the service with the specified PDB. You can view the PDB property for a service by querying the ALL_SERVICES data dictionary view or, when using the SRVCTL utility, by running the srvctl config service command.

When create or modify a service with the specified PDB, SRVCTL does not check if the PDB exists.Before running this command, you must ensure that the PDB exists.

-global {TRUE | FALSE}

Indicates whether this is a Global Data Services service.

Note: This parameter can only be used with Global Data Services.

-maxlag maximum_lag_time

Maximum replication lag time in seconds. Must be a non-negative integer. The default value is ANY.

-commit_outcome {TRUE | FALSE}

Enable Transaction Guard; when set to TRUE, the commit outcome for a transaction is accessible after the transaction's session fails due to a recoverable outage.

-retention retention_time

If -commit_outcome is set to TRUE, then this parameter determines the amount of time (in seconds) that the commit outcome is retained in the database.

-replay_init_time
 replay_initialization_time

For Application Continuity, this parameter specifies the difference between the time, in seconds, of original execution of the first operation of a request and the time that the replay is ready to start after a successful reconnect. Application Continuity will not replay after the specified amount of time has passed. This parameter is intended to avoid the unintentional execution of a transaction when a system is recovered after a long period. The default is 5 minutes (300). The maximum value is 24 hours (86400).If the -failover_type parameter is not set to TRANSACTION, then you cannot use this parameter.

-session_state {STATIC | DYNAMIC}

For Application Continuity, this parameter specifies whether the session state that is not transactional is changed by the application. Oracle recommends a setting of DYNAMIC for most applications.

Note: This parameter is considered only if -failovertype is set to TRANSACTION for Application Continuity. It describes how non-transactional is changed during a request. Examples of session state are NLS settings, optimizer preferences, event settings, PL/SQL global variables, temporary tables, advanced queues, LOBs, and result cache. If non-transactional values change after the request starts, then use the default, DYNAMIC. Most applications should use DYNAMIC mode. If you are unsure, then use DYNAMIC mode.

-pqservice pq_service

A comma-delimited list of parallel query service names.

-pqpool pq_pool_list

A comma-delimited list of parallel query server pool names

-update {-preferred
 new_preferred_instance |
 -available
 new_available_instance}

Add a new preferred or available instance to the service configuration. -preferred specifies the name of the instance to add to the list of preferred instances for the service. -available specifies the name of the instance to add to the list of available instances for the service.

-verbose

Display verbose output.

-force

Force the add operation even though a listener is not configured for a network.


Examples

Use this example syntax to add the gl.example.com service to the my_rac database with Fast Application Notification enabled for OCI connections, a failover method of BASIC, a Connection Load Balancing Goal of LONG, a failover type of SELECT, and 180 failover retries with a failover delay of 5 seconds:

srvctl add service -db my_rac -service gl.example.com -notification TRUE \
-failovermethod BASIC -failovertype SELECT -failoverretry 180 -failoverdelay 5 \
-clbgoal LONG

Use this example syntax to add a named service to a database with preferred instances and available instances and enabled for TAF:

srvctl add service -db crm -service sales -preferred crm01,crm02 -available crm03\
 -tafpolicy BASIC

srvctl add srvpool

Adds a server pool that is configured to host Oracle databases to a cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add srvpool command with the following syntax:

srvctl add srvpool -serverpool server_pool_name [-eval] 
    [-importance importance] [-min min_size] [-max max_size] 
    [-servers "node_list" | -category server_category] [-force] [-verbose]

Table A-19 srvctl add srvpool Parameters

Parameter Description
-serverpool server_pool_name

The name of the server pool.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-importance importance

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

-min min_size

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

-max max_size

The maximum size of the server pool. The default value is -1, which indicates that the size is unlimited.

-servers "node_list"

A comma-delimited list of candidate node names enclosed in double quotation marks (""). 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.

Note: In Oracle Database 12c, servers are assigned to server pools according to the value of the -category parameter.

-category server_category

The category of servers to use for the server pool, or "" for the empty category value. You can use hub for ora.hub.category, leaf for ora.leaf.category, or you can define your own category. The default is ora.hub.category.

-force

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

-verbose

Display verbose output.


Usage Notes

SRVCTL prepends "ora." to the name of the server pool.

Example

An example of this command is:

$ srvctl add srvpool -serverpool SP1 -importance 1 -min 3 -max 7

srvctl add vip

Adds a VIP to a node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl add vip command with the following syntax:

srvctl add vip -node node_name -address {VIP_name|ip}/netmask[/if1[|if2|...]]
      -netnum network_number [-skip] [-verbose]

Table A-20 srvctl add vip Parameters

Parameter Description
-node node_name

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

-address {VIP_name|ip}/netmask
[/if1[|if2|...]]

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

You can specify one VIP_name or address, along with an IPv4 netmask or IPv6 prefix length.

-netnum network_number

The network number from which VIPs are obtained. The default network number is 1.

-skip

Specify this parameter to skip checking the reachability of the VIP address.

-verbose

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 network -netnum 2 -subnet 192.168.16.0/255.255.255.0
# srvctl add vip -node node7 -address 192.168.16.17/255.255.255.0 -netnum 2

The first command creates a network number, 2, and the second command adds a VIP to this network. You can specify the network number after the -netnum parameter in other SRVCTL commands.

config

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

Note:

If you disabled an object for which you are trying to obtain configuration information using the srvctl disable object -n node_name command, then remember that using the srvctl disable object -n node_name command on a per-node basis in your cluster to disable an object throughout the cluster is different from globally disabling an object using the srvctl disable object command without the -n parameter. In the former case, the srvctl config object command may report that the object is still enabled.

See Also:

"disable" for more information about the srvctl disable command

Table A-21 srvctl config Summary

Command Description

srvctl config cvu

Displays the time interval between CVU checks

srvctl config database

Displays the configuration information of the cluster database

srvctl config havip

Displays configuration information for highly available VIP resources

 

srvctl config listener

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

srvctl config network

Displays the network configuration for the cluster

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 Oracle Notification Service

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 volume

Displays the configuration information for a volume device resource


srvctl config cvu

Displays the time interval, in minutes, between CVU checks.

Syntax and Parameters

Use the srvctl config cvu command with the following syntax:

srvctl config cvu

This command has no parameters.

Examples

The srvctl config cvu command returns output similar to the following:

CVU is configured to run once every 360 minutes

srvctl config database

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

Syntax and Parameters

Use the srvctl config database command with the following syntax:

srvctl config database [-db db_unique_name] [-all] [-verbose]

Table A-22 srvctl config database Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

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

-all

Print detailed configuration information.

-verbose

Display verbose output.


Example

The srvctl config database command returns output similar to the following:

$ srvctl config database -db myDB
Database unique name: myDB
Database name:
Oracle home: /scott_st2/oracle
Oracle user: scott
Spfile:
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: myDB
Database instances:
Disk Groups:
Services: scottsvc1
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: myDB
Candidate servers: node1 node2
Database is administrator managed

The preceding sample output shows the database type as RACOneNode, an Oracle RAC One Node database. Other potential types are RAC and SingleInstance. The Online relocation timeout, Instance name prefix, and Candidate servers fields only apply to Oracle RAC One Node databases and do not display for the other two database types. Similarly, the Database instances field is empty because the database type is RACOneNode.

srvctl config havip

Displays configuration information for a specific highly available VIP (HAVIP) (used for highly available NFS exports) or all HAVIP resources in a cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl config havip command with the following syntax:

srvctl config havip [-id havip_name]

Table A-23 srvctl config havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to display. If you do not specify this parameter, then SRVCTL displays the configuration information for all HAVIPs known to Oracle Clusterware.


Example

This command returns output similar to the following:

$ srvctl config havip -id hrexports

VIP: /mjk-vm3-vip/10.149.237.196/10.149.236.0/255.255.252.0/eth0
Description: HR Exports

srvctl config listener

Displays configuration information of a specific listener that is registered with Oracle Clusterware.

Syntax and Parameters

Use the srvctl config listener command with the following syntax:

srvctl config listener [-listener listener_name | -asmlistener | -leaflistener]
   [-all]

Table A-24 srvctl config listener Parameters

Parameter Description
-listener listener_name |
 -asmlistener | -leaflistener

The name of a specific listener name or the type of listener (Oracle ASM or Leaf Node).

If you do not specify this parameter, then SRVCTL displays the configuration for the default database listener.

-all

Print detailed configuration information.


Example

This command displays output similar to the following:

Name: LISTENER_LEAF
Subnet: 10.100.200.195
Type: type
Owner: mjkeenan
Home: Grid_home
End points: TCP:1521

srvctl config network

Displays the network configuration for the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl config network command with the following syntax:

srvctl config network [-netnum network_number]

Table A-25 srvctl config network Parameters

Parameter Description
-netnum network_number

Specifies the network for which configuration information should be displayed.


Example

An example of this command is:

$ srvctl config network -netnum 2

srvctl config nodeapps

Displays the VIP configuration for each node in the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl config nodeapps command with the following syntax:

srvctl config nodeapps [-viponly] [-onsonly]

Table A-26 srvctl config nodeapps Parameters

Parameter Description
-viponly

Displays the VIP address configuration

-onsonly

Displays the Oracle Notification Service configuration


Example

An example of this command is:

$ srvctl config nodeapps -viponly -onsonly

srvctl config oc4j

Displays configuration information for the OC4J instance.

Note:

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

This command has no parameters.

Example

This command returns output similar to the following:

$ srvctl config oc4j

OC4J is configured to run on port number 23792
OC4J is configured to listen on HTTP port number 8888
OC4J is enabled
OC4J is individually enabled on nodes:
OC4J is individually disabled on nodes:

srvctl config ons

Displays configuration information for the Oracle Notification Service daemon.

Note:

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

This command has no parameters.

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 Parameters

Use the srvctl config scan command with the following syntax:

srvctl config scan [-scannumber ordinal_number]

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

Example

This command returns output similar to the following:

$ srvctl config scan -scannumber 1

SCAN name: mjk12700890090-r, Network: 1
Subnet IPv4: 198.51.100.1/203.0.113.46/eth0, static
Subnet IPv6: 
SCAN 1 IPv4 VIP: 198.51.100.195
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:

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 Parameters

Use the srvctl config scan_listener command with the following syntax:

srvctl config scan_listener [-scannumber ordinal_number]

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

Example

This command returns output similar to the following:

$ srvctl config scan_listener -scannumber 1

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1529
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:

srvctl config service

Displays the configuration for a service.

Syntax and Parameters

Use the srvctl config service command with the following syntax:

srvctl config service -db db_unique_name [-service service_name]
    [-verbose]

Table A-27 srvctl config service Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-service service_name

Service name.

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

-verbose

Displays verbose output.


Examples

This command displays information similar to the following for a policy-managed database:

$ srvctl config service -db crm -service webapps
Service name: webapps
Service is enabled
Server pool: sales
Cardinality: SINGLETON
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Service is enabled on nodes:
Service is disabled on nodes:
Edition: "my Edition"

This command displays information similar to the following for a administrator-managed database:

$ srvctl config service -db crm -service webapps
Service name: webapps
Service is enabled
Server pool: sales
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: crm_1
Available instances:
Edition: "my Edition"

Service configuration for administrator-managed Oracle RAC One Node databases displays the one instance as preferred.

Note:

The srvctl config service command shows exactly the string value you specified for the edition using the srvctl add | modify service commands. If you specified the edition in upper case, then srvctl config service displays upper case. If it is surrounded by double quotation marks (""), then the command displays the double quotation marks. Otherwise, the command displays an empty string.

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 Parameters

Use the srvctl config srvpool command with the following syntax:

srvctl config srvpool [-serverpool pool_name]

The only parameter available for this command is -serverpool pool_name, which is the name of the server pool to display the configuration information for.

Example

An example of this command is:

$ srvctl config srvpool -serverpool 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 Parameters

Use the srvctl config vip command with the following syntax:

srvctl config vip {-node node_name | -vip vip_name}

Table A-28 srvctl config vip Parameters

Parameter Description
-node node_name

Specify the node name. The command returns output similar to the following:

VIP exists: ipv4, ipv6, network number 1, hosting node adc2100252
-vip vip_name

Specify the VIP name. The command returns output similar to the following:

VIP exists: ipv4, ipv6, network number 1, hosting node adc2100252

Example

An example of this command is:

$ srvctl config vip -node crmnode1

VIP exists: /crmnode1-vip/192.168.2.20/255.255.255.0/eth0

srvctl config volume

Displays the configuration for a specific volume or all volumes.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl config volume command with the following syntax:

srvctl config volume [-volume volume_name] [-diskgroup disk_group_name]
    [-device volume_device]

Table A-29 srvctl config volume Parameters

Parameter Description
-volume volume_name

Specify the name of the volume for which you want to view the configuration.

-diskgroup disk_group_name

Specify the name of the disk group in which the volume resides for which you want to display the configuration.

-device volume_device

Specify the path to the volume device for which you want to display the configuration.


Usage Notes

  • If you do not specify any of the optional parameters, then SRVCTL displays the configuration information for all volumes.

  • If you specify only the -volume parameter, then SRVCTL displays the configuration for all volumes with that name, regardless of the diskgroup.

  • If you specify only the -diskgroup parameter, then SRVCTL displays the configuration information for the volumes that reside in the disk group that you specify.

  • If you specify only the -device parameter, then SRVCTL displays the configuration information for the volume matching that device specifier.

  • If you specify the -diskgroup and -device parameters, then SRVCTL displays the configuration information for the volume device that resides in the disk group that you specify.

Examples

The srvctl config volume command displays information similar to the following:

$ srvctl config volume -device /dev/asm/volume1-123

Diskgroup Name: DG1
Volume Name   : VOL1
Volume Device : /dev/asm/volume1-123
Volume is enabled.
Volume is enabled on nodes:
Volume is disabled on nodes:

If you do not specify any parameters, then SRVCTL displays configuration information for all volumes, similar to the following:

$ srvctl config volume

Diskgroup name: DG1
Volume name: VOL1
Volume device: /dev/asm/volume1-123
Volume is enabled.
Volume is enabled on nodes:
Volume is disabled on nodes:
Diskgroup name: DG1
Volume name: VOL2
Volume device: /dev/asm/volume2-456
Volume is enabled.
Volume is enabled on nodes:
Volume is disabled on nodes:

srvctl convert database

The srvctl convert database command converts a database either to or from an Oracle RAC One Node database.

Syntax and Parameters

Use the srvctl convert database command with one of the following syntax models:

srvctl convert database -db db_unique_name -dbtype RACONENODE 
       [-instance instance_name] [-timeout timeout]

srvctl convert database -db db_unique_name -dbtype RAC [-node node_name]

Table A-30 srvctl convert database Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

Note: If you specify a noncluster database, then command returns an error instructing you to use rconfig to convert the noncluster database to Oracle RAC or Oracle RAC One Node.

-dbtype RACONENODE | RAC

The type of database to which you are converting, either Oracle RAC One Node or Oracle RAC.

Note: If there is an ongoing or failed online database relocation, then the command returns an error instructing you to first complete or abort the online database relocation and then rerun the command.

-instance instance_name

Instance name prefix for Oracle RAC One Node databases. The default value for this parameter is the first 12 characters of the global unique name of the database.

Notes:

  • You can use this parameter only when converting from an Oracle RAC database to an Oracle RAC One Node database.

  • In order for the converted instance to come online, you must restart the database using the srvctl stop/start database commands.

-timeout timeout

Online database relocation timeout, in minutes, for Oracle RAC One Node databases. The default is 30.

-node node_name

Name of the node for administrator-managed Oracle RAC database. The default is the first candidate.

Note: If you do not specify a node name or you specify a node name where the database is not running, then the command returns an error instructing you specify the correct node.


Example

An example of this command is:

$ srvctl convert database -db myDB -dbtype RACONENODE -instance myDB3

disable

Disables a specified object (cluster database, database instance, Oracle ASM instance, or service). Use the srvctl disable command when you must shut down an object for maintenance. The disabled object does not automatically restart.

When you run 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 -instance instance_name or -node node_name, then SRVCTL only disables the object on the specified instance or node.

If you do not specify -instance instance_name or -node node_name, then the disable action applies to the object that you specified, globally, on all nodes in the cluster and also supersedes any per-node disable settings. Any object you disable globally is also disabled on any nodes you add to the cluster in the future.

Disabling an object globally is different from disabling an object, individually, on each node in the cluster. For example, if you disable a database on several nodes, individually, in a cluster, then, when you run the srvctl start database command, the database starts only on nodes where the database is enabled. If, however, you disable the database globally, then the srvctl start database command is rejected because the database is disabled, clusterwide.

Table A-31 srvctl disable Summary

Command Description

srvctl disable cvu

Disables the Cluster Verification Utility

srvctl disable database

Disables the cluster database

srvctl disable diskgroup

Disables a disk group on a number of specified nodes

srvctl disable filesystem

Disables an Oracle ACFS volume

srvctl disable gns

Disables GNS

srvctl disable havip

Prevents an HAVIP resource from running on a number of specified nodes

srvctl disable instance

Disables an instance

 

srvctl disable listener

Disables a listener

srvctl disable mgmtdb

Disables the management database

srvctl disable mgmtlsnr

Disables the management listener

srvctl disable nodeapps

Disables a node application and GSD

srvctl disable oc4j

Disables OC4J instances

srvctl disable ons

Disables the Oracle Notification Service 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 volume

Disables a volume


srvctl disable cvu

Disable the Cluster Verification Utility (CVU) for Oracle Clusterware management, if enabled.

Syntax and Parameters

Use the srvctl disable cvu command with the following syntax:

srvctl disable cvu [-node node_name]

You can specify a particular node on which to disable CVU.

Table A-32 srvctl disable cvu Parameters

Parameter Description
-node node_name

Node name


Examples

An example of this command to disable CVU on the node in the cluster named crmnode1 is:

$ srvctl disable cvu -node crmnode1

srvctl disable database

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

Syntax and Parameters

Use the srvctl disable database command with the following syntax:

srvctl disable database -db db_unique_name [-node node_name]

Table A-33 srvctl disable database Parameters

Parameter Description
-db database_name

Database name

-node node_name

Disables the database from running on the named node.

Note: This parameter can be used only with Oracle Clusterware.


Example

An example of this command is:

$ srvctl disable database -db mydb1

srvctl disable diskgroup

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

Syntax and Parameters

Use the srvctl disable diskgroup command with the following syntax:

srvctl disable diskgroup -diskgroup diskgroup_name [-node "node_list"]

Table A-34 srvctl disable diskgroup Parameters

Parameter Description
-diskgroup diskgroup_name

The Oracle ASM disk group name.

-node "node_list"

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

This parameter is only available with Oracle Clusterware.


Example

An example of this command is:

$ srvctl disable diskgroup -diskgroup dgroup1 -node "mynode1,mynode2"

srvctl disable filesystem

Disables a specific Oracle Clusterware-managed file system volume.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable filesystem command with the following syntax:

srvctl disable filesystem -device volume_device

Table A-35 srvctl disable filesystem Parameters

Parameter Description
-device volume_device

Specify the path to the file system volume you want to disable.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

# srvctl disable filesystem -device /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 Parameters

Use the srvctl disable gns command with the following syntax:

srvctl disable gns [-node node_name] [-verbose]

Table A-36 srvctl disable gns Parameters

Parameter Description
-node node_name

Name of a node in the cluster

If you do not specify this parameter, then SRVCTL disables GNS for the entire cluster.

-verbose

Display verbose output


Example

An example of this command to disable GNS on the node named crm7 is:

$ srvctl disable gns -node crm7

srvctl disable havip

Prevents a specific highly available VIP (HAVIP) (used for highly available NFS exports) resource from running on a number of specified nodes.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable havip command with the following syntax:

srvctl disable havip -id havip_name [-node node1,node2,...,noden]

Table A-37 srvctl disable havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to disable.

-node node1,node2,...,noden

Specify the name of a node or a comma-delimited list of node names on which you do not want the HAVIP resource to run.

If you specify all but one node in the cluster, then the HAVIP will not fail over.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

$ srvctl disable havip -id myhavip -node myNode1,myNode3

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.

Notes:

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

  • If you run this command on an Oracle RAC One Node database, then the command returns an error instructing you to use the database noun, instead.

Syntax and Parameters

Use the srvctl disable instance command with the following syntax:

srvctl disable instance -db db_unique_name -instance instance_name_list

Table A-38 srvctl disable instance Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-instance instance_name_list

Comma-delimited list of instance names


Example

An example of this command is:

$ srvctl disable instance -db crm -instance "crm1,crm3"

srvctl disable listener

Disables a listener resource.

Syntax and Parameters

Use the srvctl disable listener command with the following syntax:

srvctl disable listener [-listener listener_name] [-node node_name]

Table A-39 srvctl disable listener Parameters

Parameter Description
-listener listener_name

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

-node node_name

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

This parameter is only available with Oracle Clusterware.


Example

To disable the listener named listener_crm on the node node5, use this command:

$ srvctl disable listener -listener listener_crm -node node5

srvctl disable mgmtdb

Disables the management database (CHM repository) resource on the specified node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable mgmtdb command with the following syntax:

srvctl disable mgmtdb [-node node_name]

Table A-40 srvctl disable mgmtdb Parameters

Parameter Description
-node node_name

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


Example

An example of this command is:

$ srvctl disable mgmtdb

srvctl disable mgmtlsnr

Disables the management listener resource (for CHM) on the specified node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable mgmtlsnr command with the following syntax:

srvctl disable mgmtlsnr [-node node_name]

Table A-41 srvctl disable mgmtlsnr Parameters

Parameter Description
-node node_name

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


Example

An example of this command is:

$ srvctl disable mgmtlsnr

srvctl disable nodeapps

Disables node applications on all nodes in the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable nodeapps command with the following syntax:

srvctl disable nodeapps [-gsdonly] [-adminhelper] [-verbose]

Table A-42 srvctl disable nodeapps Parameters

Parameter Description
-gsdonly

Disables GSD

-adminhelper

Disable the Administrator helper only

-verbose

Verbose output


Example

An example of this command is:

$ srvctl disable nodeapps -gsdonly -verbose

srvctl disable oc4j

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

Syntax and Parameters

Use the srvctl disable oc4j command with the following syntax:

srvctl disable oc4j [-node node_name] [-verbose]

Table A-43 srvctl disable oc4j Parameters

Parameter Description
-node node_name

The name of a node in the cluster

-verbose

Verbose output


Example

An example of this command is:

$ srvctl disable oc4j -node crm3

srvctl disable ons

Disables the Oracle Notification Service daemon for Oracle Restart installations.

srvctl disable ons [-verbose]

The only parameter for this command is -verbose, 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 Parameters

Use the srvctl disable scan command with the following syntax:

srvctl disable scan [-scannumber ordinal_number]

The only parameter available for this command is -scannumber 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 -scannumber 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 Parameters

Use the srvctl disable scan_listener command with the following syntax:

srvctl disable scan_listener [-scannumber ordinal_number]

The only parameter available for this command is -scannumber 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 -scannumber 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 Parameters

Use the srvctl disable service command with the following syntax:

srvctl disable service -db db_unique_name -servics "service_name_list" 
   [-instance instance_name | -node node_name]

If you do not specify either the -instance instance_name or -node node_name parameters, then the command disables the service on all nodes.

Table A-44 srvctl disable service Parameters

Parameter Description
-database db_unique_name

Unique name for the database.

-service "service_name_list"

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

-instance instance_name

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

Notes:

  • Use this parameter with administrator-managed databases

  • This parameter can be used only with Oracle Clusterware and Oracle RAC

-node node_name

The name of the node on which to disable the service.

Notes:

  • Use this parameter with policy-managed databases

  • This parameter can be used only with Oracle Clusterware and Oracle RAC


Examples

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

$ srvctl disable service -db crm -service "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 -db crm -service crm -instance crm1

srvctl disable vip

Disables a specific VIP.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable vip command with the following syntax:

srvctl disable vip -vip vip_name [-verbose]

Table A-45 srvctl disable vip Parameters

Parameter Description
-vip vip_name

The VIP name

-verbose

Verbose output


Example

An example of this command is:

$ srvctl disable vip -vip vip1 -verbose

srvctl disable volume

Disables Oracle Clusterware management for a specific volume or all volumes.

This command allows a volume device to be stopped by operating on the Oracle Clusterware resource for the volume. This command does not stop volume device.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl disable volume command with the following syntax:

srvctl disable volume {-volume volume_name -diskgroup disk_group_name |
    -device volume_device}

Table A-46 srvctl disable volume Parameters

Parameter Description
-volume volume_name

Specify the name of the volume that you want to disable. This parameter is required.

-diskgroup disk_group_name

Specify the name of the disk group in which the volume that you want to disable resides.

-device volume_device

Specify the path to the volume device that you want to disable.


Usage Notes

  • You must specify a particular volume that you want to disable. You can specify a volume that resides in either a particular disk group or on a particular volume device.

Example

The following example disables a volume named VOLUME1 that resides in a disk group named DATA:

$ srvctl disable volume -volume VOLUME1 -diskgroup DATA

srvctl downgrade database

The srvctl downgrade database command downgrades the configuration of a database and its services from its current version to the specified lower version.

Syntax and Parameters

Use the srvctl downgrade database command as follows:

srvctl downgrade database -db db_unique_name -oraclehome Oracle_home 
       -targetversion to_version

Table A-47 srvctl downgrade database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-oraclehome Oracle_home

The path to the ORACLE_HOME

-targetversion to_version

The version to which to downgrade


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 SRVCTL returns a message advising you that the object is enabled. Enabled objects can be started, and disabled objects cannot be started.

When you run the enable command, the object is enabled and available to run under Oracle Clusterware for automatic startup, failover, or restart. Additionally, you can run the srvctl start command on an enabled object. If you specify -instance instance_name or -node node_name, then SRVCTL only enables the object on the specified instance or node.

If you do not specify -instance instance_name or -node node_name, then the enable action applies to the object that you specified, globally, on all nodes in the cluster and also removes any per-node enable settings. Any object you enable globally is also enabled on any nodes you add to the cluster in the future.

Enabling an object globally is different from enabling an object, individually, on each node in the cluster. For example, if you enable a database on several nodes, individually, in a cluster, then, when you run the srvctl start database command, the database starts only on nodes where the database is enabled. If, however, you enable the database globally, then the srvctl start database command starts the database on all nodes on which it is configured to run.

Table A-48 srvctl enable Summary

Command Description

srvctl enable asm

Enables an Oracle ASM instance

srvctl enable cvu

Enables the Cluster Verification Utility

srvctl enable database

Enables the database resource

srvctl enable diskgroup

Enables a specified disk group on a number of specified nodes

srvctl enable filesystem

Enables an Oracle ACFS volume

srvctl enable gns

Enables GNS

srvctl enable havip

Allows an HAVIP resource to run on a number of specified nodes

srvctl enable instance

Enables the instance

 

srvctl enable listener

Enables a listener

srvctl enable mgmtdb

Enables the management database for Oracle Clusterware management.

srvctl enable mgmtlsnr

Enables the management listener for Oracle Clusterware management

srvctl enable nodeapps

Enables node applications and GSD

srvctl enable oc4j

Enables OC4J instances

srvctl enable ons

Enables the Oracle Notification Service 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 volume

Enables a volume


srvctl enable asm

Enables an Oracle ASM instance.

Note:

To manage Oracle ASM on Oracle Database 12c 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 Parameters

Use the srvctl enable asm command with the following syntax:

srvctl enable asm [-proxy] [-node node_name]

Table A-49 srvctl enable asm Parameters

Parameter Description
-proxy

Specifies whether you are disabling a proxy Oracle ASM instance.

-node node_name

Node name

Note: This parameter can be used only with Oracle Clusterware.


Example

An example of this command is:

$ srvctl enable asm -node crmnode1

srvctl enable cvu

Enable the Cluster Verification Utility (CVU) for Oracle Clusterware management if disabled.

Syntax and Parameters

Use the srvctl enable cvu command with the following syntax:

srvctl enable cvu [-node node_name]

You can specify a particular node on which to enable CVU.

Table A-50 srvctl enable cvu Parameters

Parameter Description
-node node_name

The name of the node on which to enable CVU

Note: This parameter can be used only with Oracle Clusterware.


Examples

An example of this command to enable CVU on the node in the cluster named crmnode1 is:

$ srvctl enable cvu -node crmnode1

srvctl enable database

Enables a cluster database and its instances.

Syntax and Parameters

Use the srvctl enable database command with the following syntax:

srvctl enable database -db db_unique_name [-node node_name]

Table A-51 srvctl enable database Parameters

Parameter Description
-db database_name

Database name

-node node_name

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

Note: This parameter can be used only with Oracle Clusterware.


Example

An example of this command is:

$ srvctl enable database -db mydb1

srvctl enable diskgroup

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

Syntax and Parameters

Use the srvctl enable diskgroup command with the following syntax:

srvctl enable diskgroup -diskgroup diskgroup_name [-node "node_list"]

Table A-52 srvctl enable diskgroup Parameters

Parameter Description
-diskgroup diskgroup_name

The Oracle ASM disk group name

-nodelist node_list

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

This parameter is only available with Oracle Clusterware.


Example

An example of this command is:

$ srvctl enable diskgroup -diskgroup diskgroup1 -node "mynode1,mynode2"

srvctl enable filesystem

Enables an Oracle ACFS volume or generic file system in Oracle Clusterware.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable filesystem command with the following syntax:

srvctl enable filesystem -device volume_device

Table A-53 srvctl enable filesystem Parameters

Parameter Description
-device volume_device

Specify the path to the volume device you want to enable.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

# srvctl enable filesystem -device /dev/asm/racvol1

srvctl enable gns

Enables GNS on all nodes or a specific node.

Note:

This command can be used only with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable gns command with the following syntax:

srvctl enable gns [-node node_name] [-verbose]

Table A-54 srvctl enable gns Parameters

Parameter Description
-node node_name

Name of the node on which to enable GNS.

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

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl enable gns

srvctl enable havip

Enables a specific highly available VIP (HAVIP) (used for highly available NFS exports) to run on a number of specified nodes.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable havip command with the following syntax:

srvctl enable havip -id havip_name [-node node_name]

Table A-55 srvctl enable havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to enable.

-node node_name

Specify the name of a node on which you want the HAVIP resource to be able to run.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

# srvctl enable havip -id myhavip -node myNode1

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.

Notes:

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

  • If you run this command on an Oracle RAC One Node database, then the command returns an error instructing you to use the database noun, instead.

Syntax and Parameters

Use the srvctl enable instance command with the following syntax:

srvctl enable instance -db db_unique_name -instance "instance_name_list"

Table A-56 srvctl enable instance Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-instance "instance_name_list"

Comma-delimited list of instance names.


Example

An example of this command is:

$ srvctl enable instance -db crm -instance "crm1,crm2"

srvctl enable listener

Enables a listener resource.

Syntax and Parameters

Use the srvctl enable listener command with the following syntax:

srvctl enable listener [-listener listener_name] [-node node_name]

Table A-57 srvctl enable listener Parameters

Parameter Description
-listener listener_name

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

-node node_name

Name of a cluster node

Note: This parameter can be used only with Oracle Clusterware.


Example

To enable the listener named listener_crm on the node named node5, use the following command:

$ srvctl enable listener -listener listener_crm -node node5

srvctl enable mgmtdb

Enables a management database (CHM repository) resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable mgmtdb command with the following syntax:

srvctl enable mgmtdb [-node node_name]

Table A-58 srvctl enable mgmtdb Parameters

Parameter Description
-node node_name

Name of a cluster node

Note: This parameter can be used only with Oracle Clusterware.


Example

To enable a management database on the node named node5, use the following command:

$ srvctl enable mgmtdb -node node5

srvctl enable mgmtlsnr

Enables a management database listener resource (for CHM).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable mgmtlsnr command with the following syntax:

srvctl enable mgmtlsnr [-node node_name]

Table A-59 srvctl enable mgmtlsnr Parameters

Parameter Description
-node node_name

Name of a cluster node

Note: This parameter can be used only with Oracle Clusterware.


Example

To enable a management listener on the node named node5, use the following command:

$ srvctl enable mgmtlsnr -node 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 Parameters

Use the srvctl enable nodeapps command with the following syntax:

srvctl enable nodeapps [-gsdonly] [-adminhelper] [-verbose]

Table A-60 srvctl enable nodeapps Parameters

Parameter Description
-gsdonly

Enable only the GSD daemon

-adminhelper

Enable the Administrator helper only

-verbose

Verbose output


Example

An example of this command is:

$ srvctl enable nodeapps -gsdonly -verbose

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 Parameters

Use the srvctl enable oc4j command with the following syntax:

srvctl enable oc4j [-node node_name] [-verbose]

Table A-61 srvctl enable oc4j Parameters

Parameter Description
-node node_name

The name of a node in the cluster

-verbose

Verbose output


Example

An example of this command is:

$ srvctl enable oc4j -node crm3

srvctl enable ons

Enables the Oracle Notification Service daemon.

Note:

This command is only available with Oracle Restart.

Syntax and Parameters

Use the srvctl enable ons command with the following syntax:

srvctl enable ons [-verbose]

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

Example

An example of this command is:

$ srvctl enable ons

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 Parameters

Use the srvctl enable scan command with the following syntax:

srvctl enable scan [-scannumber ordinal_number]

The only parameter available for this command is -scannumber ordinal_number, which identifies 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 -scannumber 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 Parameters

Use the srvctl enable scan_listener command with the following syntax:

srvctl enable scan_listener [-scannumber ordinal_number]

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

Example

An example of this command is:

$ srvctl enable scan_listener -scannumber 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 Parameters

Use the srvctl enable service command with the following syntax:

srvctl enable service -db db_unique_name -service "service_name_list"
     [-instance instance_name | -node node_name]

Table A-62 srvctl enable service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service "service_name_list"

Comma-delimited list of service names

-instance instance_name

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

Use this parameter for administrator-managed databases

Note: This parameter can be used only with Oracle Clusterware and Oracle RAC.

-node node_name

Name of the node where you want the service to run

Use this parameter for policy-managed databases

Note: This parameter can be used only with Oracle Clusterware and Oracle RAC.


Examples

The following example globally enables a service:

$ srvctl enable service -db crm -service crm

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

$srvctl enable service -db crm -service crm -instance crm1

srvctl enable vip

Enables a specific VIP.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable vip command with the following syntax:

srvctl enable vip -vip vip_name [-verbose]

Table A-63 srvctl enable vip Parameters

Parameter Description
-vip vip_name

The VIP name

-verbose

Verbose output


Example

The following command enables a VIP named crm1-vip:

$ srvctl enable vip -vip crm1-vip -verbose

srvctl enable volume

Enables Oracle Clusterware management for a specific volume or all volumes.

This command allows a volume device to be started by operating on the Oracle Clusterware resource for the volume. This command does not start the volume device, and is different from the SQL command ALTER DISKGROUP ENABLE VOLUME or the ASMCMD command volenable, because these two commands bring the volume device online, in a running state, making the volume device accessible.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl enable volume command with the following syntax:

srvctl enable volume {-volume volume_name -diskgroup disk_group_name |
    -device volume_device}

Table A-64 srvctl enable volume Parameters

Parameter Description
-volume volume_name

Specify the name of the volume that you want to enable. This parameter is required.

-diskgroup disk_group_name

Specify the name of the disk group in which the volume that you want to enable resides.

-device volume_device

Specify the path to the volume device that you want to enable.


Usage Notes

  • You must specify a particular volume that you want to enable. You can specify a volume that resides in either a particular disk group or on a particular volume device.

Example

The following example enables a volume named VOLUME1 that resides in a disk group named DATA:

$ srvctl enable volume -volume VOLUME1 -diskgroup DATA

srvctl export gns

The srvctl export gns command exports Grid Naming Service (GNS) instance data to a file that you can use when you are either moving GNS from one server cluster to another or when you are creating a client cluster

SRVCTL extracts the data from OCR. Exported data includes:

  • The credentials used to authorize users, which includes the VIP address on which the server listens

  • The names and DNS records kept in GNS

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl export gns command with the following syntax:

srvctl export gns {-instance path_to_file | -clientdata path_to_file}

Table A-65 srvctl export gns Parameters

Parameter Description
-instance path_to_file

Use this parameter to specify the file to which GNS instance data is written.

Use this parameter when you are moving GNS from one server cluster to another.

-clientdata path_to_file

Use this parameter to specify the file to which GNS credentials data is written.

Use this parameter when you are adding a client cluster to create a file that contains credentials that the client cluster accesses to perform name management operations on the server cluster.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms, or as an Administrator user on Windows platforms

  • You must run this command on any node in the server cluster

  • GNS does not need to be running during export

  • The data must be locked during the procedure to ensure consistency

Example

The following command exports the GNS credentials data to a file named gns.txt:

# srvctl export gns -clientdata /temp/gnsdata/gns.txt

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-66 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 mgmtdb

Gets the management database environment variables

srvctl getenv mgmtlsnr

Gets the management listener resource environment variables

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 Parameters

Use the srvctl getenv asm command with the following syntax:

srvctl getenv asm [-envs "name_list"]

Table A-67 srvctl getenv asm Parameters

Parameter Description
-envs "name_list"

Comma-delimited list of the names of environment variables.

If this parameter 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 Parameters

Use the srvctl getenv database command with the following syntax:

srvctl getenv database -db db_unique_name [-envs "name_list"]

Table A-68 srvctl getenv database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-envs "name_list"

Comma-delimited list of the names of environment variables

If this parameter 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 -db crm

srvctl getenv listener

Gets the environment variables for the specified listener.

Syntax and Parameters

Use the srvctl getenv listener command with the following syntax:

srvctl getenv listener [-listener listener_name] [-envs "name_list"]

Table A-69 srvctl getenv listener Parameters

Parameter Description
-listener listener_name

Listener name

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

-envs "name_list"

Comma-delimited list of the names of environment variables

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


Example

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

$ srvctl getenv listener

srvctl getenv mgmtdb

Gets the environment variables for the management database (CHM repository).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl getenv mgmtdb command with the following syntax:

srvctl getenv mgmtdb [-envs "name_list"]

Table A-70 srvctl getenv mgmtdb Parameters

Parameter Description
-envs "name_list"

Comma-delimited list of the names of environment variables

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


Example

The following example lists all environment variables specified for the management database:

$ srvctl getenv mgmtdb

srvctl getenv mgmtlsnr

Gets the environment variables for the management listener resource (for CHM).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl getenv mgmtlsnr command with the following syntax:

srvctl getenv mgmtlsnr [-envs "name_list"]

Table A-71 srvctl getenv mgmtlsnr Parameters

Parameter Description
-envs "name_list"

Comma-delimited list of the names of environment variables

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


Example

The following example lists all environment variables specified for the management listener:

$ srvctl getenv mgmtlsnr

srvctl getenv nodeapps

Gets the environment variables for the node application configurations.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl getenv nodeapps command with the following syntax:

srvctl getenv nodeapps [-viponly] [-onsonly] [-envs "name_list"]

Table A-72 srvctl getenv nodeapps Parameters

Parameter Description
-viponly

Displays the VIP address configuration

-onsonly

Displays the Oracle Notification Service configuration

-envs "name_list"

Comma-delimited list of the names of environment variables

If this parameter is not specified, then SRVCTL displays the values of all environment variables associated with the node applications.


Example

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

$ srvctl getenv nodeapps -viponly

srvctl getenv vip

Gets the environment variables for the specified VIP.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl getenv vip command with the following syntax:

srvctl getenv vip -vip vip_name [-envs "name_list"] [-verbose]

Table A-73 srvctl getenv vip Parameters

Parameter Description
-vip vip_name

The name of the VIP

-envs "name_list"

Comma-delimited list of the names of environment variables

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

-verbose

Verbose output


Example

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

$ srvctl getenv vip -vip node1-vip

srvctl import gns

The srvctl import gns command imports data from a file that you create when you run the Syntax and Parameters command. Use this command when you want to locate GNS to a different server cluster.

When you import GNS data, SRVCTL stores the credentials and places the record data into OCR. If another GNS instance is running or data for another instance is encountered during the import procedure, then an error occurs.

This command also makes the cluster in which you run it the server cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl import gns command with the following syntax:

srvctl import gns -instance path_to_file

Provide the fully-qualified file name of the file into which you exported the GNS data.

Usage Notes

  • You must run this command as root on Linux and UNIX platforms, or as an Administrator user on Windows platforms

  • You must manually copy the file into which you exported the GNS data from the location where you created it to a node in the cluster that you want to make a server cluster.

  • You can only run this command on a multicluster server

Example

The following command imports the GNS data from a file named gns.txt:

# srvctl import gns -instance /temp/gnsdata/gns.txt

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 reentered. 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-74 srvctl modify Summary

Command Description

srvctl modify asm

Modifies the configuration for Oracle ASM

srvctl modify cvu

Modifies the check interval of the Cluster Verification Utility

srvctl modify database

Modifies the configuration for a database

srvctl modify filesystem

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

srvctl modify gns

Modifies the GNS configuration

srvctl modify havip

Modifies a highly available VIP resource

srvctl modify instance

Modifies the configuration for an instance

 

srvctl modify listener

Modifies the listener configuration

srvctl modify mgmtdb

Modifies the management database configuration

srvctl modify mgmtlsnr

Modifies the management listener configuration

srvctl modify network

Modifies the configuration for a network

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 Oracle Notification Service 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 vip

Modifies the VIP to use a different IP address type


srvctl modify asm

Modify the listener used by Oracle ASM, the disk group discovery string used by Oracle ASM, or the SPFILE used by Oracle ASM for a noncluster database or a cluster database.

Note:

To manage Oracle ASM on Oracle Database 12c 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 Parameters

Use the srvctl modify asm command with the following syntax:

srvctl modify asm [-listener listener_name] [-pwfile password_file_path]
  [-count {number_of_instances | ALL}] [-diskstring asm_diskstring]
  [-spfile spfile_path_name [-proxy] [-force]]

Table A-75 srvctl modify asm Parameters

Parameter Description
-listener listener_name

The listener name with which Oracle ASM registers

-pwfile password_file_path

The full path to the location of the password file for Oracle ASM.

-count {number_of_instances | ALL}

Specify the number of Oracle ASM instances to create or that an Oracle ASM instance should be created on all nodes.

-diskstring asm_diskstring

The new Oracle ASM disk group discovery string

-spfile spfile_path_name

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

 
-proxy

Specifies an Oracle ASM proxy instance

-force

Force modification

 

Usage Notes

  • The srvctl modify asm command with the -listener listener_name parameter can be used only with Oracle Clusterware.

  • The -diskstring asm_diskstring and -spfile spfile_path_name parameters are available only with Oracle Restart.

    See Also:

    Oracle Database Administrator's Guide for more information about using the srvctl modify asm command with Oracle Restart

Example

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

$ srvctl modify asm -listener lsnr1

srvctl modify cvu

Modifies the check interval for CVU in an Oracle Clusterware configuration.

Syntax and Parameters

Use the srvctl modify cvu command with the following syntax:

srvctl modify cvu [-checkinterval time_in_minutes]]

Table A-76 srvctl modify cvu Parameters

Parameter Description
-checkinterval time_in_minutes

By default, CVU runs once every 360 minutes (six hours) and verifies the health of cluster. The shortest interval you can specify for CVU check is 10 minutes.


Examples

An example of this command to modify CVU to have a check interval of 4 hours is:

$ srvctl modify cvu -checkinterval 240

srvctl modify database

Modifies the configuration for a database.

Syntax and Parameters

Use the srvctl modify database command with the following syntax:

srvctl modify database -db db_unique_name [-eval] [-dbname db_name] 
     [-instance instance_name] [-oraclehome oracle_home] [-user user_name] 
     [-server server_list] [-timeout timeout] [-domain db_domain] 
     [-spfile spfile] [-pwfile password_file_path]
     [-role {PRIMARY|PHYSICAL_STANDBY|LOGICAL_STANDBY|SNAPSHOT_STANDBY}]
     [-startoption start_options] [-stopoption stop_options] 
     [-policy {AUTOMATIC | MANUAL | NORESTART}]
     [-serverpool "server_pool_list" [-node node_name]] 
     [-pqpool pq_server_pools] [{-diskgroup "diskgroup_list" | -nodiskgroup}]
     [-acfspath "acfs_path_list"] [-force]

Table A-77 srvctl modify database Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-dbname 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 -database parameter.

-instance instance_name

Instance name prefix; this parameter is required for administrator-managed Oracle RAC One Node databases.

-oraclehome oracle_home

Path for the Oracle home for the database.

-user user_name

The name of the user that owns the Oracle home directory.

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

-server "server_list"

List candidate servers for Oracle RAC One Node databases.

Notes: You can use this parameter only with administrator-managed Oracle RAC One Node databases. If your Oracle RAC One Node database is policy managed, you cannot use this parameter.

-timeout timeout

Online database relocation timeout, in minutes, for Oracle RAC One Node databases. The default is 30.

-domain db_domain

Specify a domain for the database.

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

-spfile spfile

The full path to the location of the database server parameter file in an Oracle ASM disk group.

-pwfile password_file_path

The full path to the location of the password file in an Oracle ASM disk group.

-role [PRIMARY | PHYSICAL_STANDBY
 | LOGICAL_STANDBY
 | SNAPSHOT_STANDBY]

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

-startoption start_options

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

Notes:

  • For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

  • When performing a switchover in an Oracle Data Guard configuration, the -startoption for a standby database that becomes a primary database is always set to OPEN after the switchover.

See Also: SQL*Plus User's Guide and Reference for more information about startup options

-stopoption stop_options

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

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-policy [AUTOMATIC
 | MANUAL | NORESTART

Management policy for the database resource.

-serverpool "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 parameter 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 parameter can be used only with Oracle Clusterware and Oracle RAC.

-node node_name

The name of the node in the specified server pool on which to run a single-instance database. This parameter can only be specified with the -serverpool parameter.

-diskgroup "diskgroup_list"

Comma-delimited list of Oracle ASM disk groups.

-nodiskgroup

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

-acfspath "acfs_path_list"

A single Oracle ACFS path or a comma-delimited list of Oracle ACFS paths enclosed in double quotation marks ("") where the database's dependency is set.

Use this parameter to create dependencies on Oracle ACFS file systems other than ORACLE_HOME, such as for when the database uses ORACLE_BASE on a file system that is different from the ORACLE_HOME file system.

-force

Force the operation even though the some resources might be stopped.


Usage Notes

  • The srvctl modify database command can convert administrator-managed databases to policy-managed databases. For a running administrator-managed database, if the server list is supplied, then the node where the database is running must be on that list. The instance name prefix cannot be modified after running the srvctl add database command.

  • You cannot change the management policy from AUTOMATIC (using the -policy parameter) for Oracle RAC One Node databases. Any attempt to do so results in an error message. The same is true for the -node parameter, which is used to change the node on which a noncluster database runs.

  • For policy-managed Oracle RAC One Node databases, you can use the -serverpool parameter to move an Oracle RAC One Node database between server pools but you can only specify one server pool. Specifying a list of server pools returns an error.

Examples

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

$ srvctl modify database -db crm -role logical_standby

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

$ srvctl modify database -db racTest -diskgroup "SYSFILES,LOGS,OLTP"

srvctl modify filesystem

Modifies the configuration of the file system resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify filesystem command with the following syntax:

srvctl modify filesystem -device volume_device -user user_name
    [-path mountpoint_path] [-node node_list | -serverpool
    server_pool_list] [-fsoptions options] [-description description]
    [-autostart {ALWAYS | NEVER | RESTORE}]

Table A-78 srvctl modify filesystem Parameters

Parameter Description
-device volume_device

Specify the path to the file system volume device that you want to modify.

-user user_name

Name of the user that is authorized to mount and unmount the file system. If you do not specify this parameter, then SRVCTL defaults to the user running the command.

-path mountpoint_path

Specify the mount point path.

-node node_list |
 -serverpool server_pool_list

Specify a comma-delimited list of either nodes or server pools on which to mount the file system device.

-fsoptions options

Specify a comma-delimited list of file system mount options.

-description description

Specify a file system description.

-autostart {ALWAYS | NEVER |
 RESTORE}

Specify the file system resource autostart policy.


ALWAYS: The file system resource always automatically starts
NEVER: The file system does not automatically start
RESTORE: The file system is restored to its last state. This is the default option.

Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

  • When performing online changes to the file system resource, the changes take effect only after the resource is next (re)started.

Examples

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

# srvctl modify filesystem -device /dev/asm/racvol1 -user sysad

srvctl modify gns

Modifies the IP address, domain, or other configuration parameters used by GNS.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

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

srvctl modify gns -loglevel log_level 

srvctl modify gns [-resolve name] [-verify name] 
   [-parameter  name:value[,name:value...]] [-vip {vip_name | ip} [-skip]]
   [-clientdata file_name] [-verbose]

Table A-79 srvctl modify gns Parameters

Parameter Description
-loglevel log_level

Specify the GNS diagnostic logging level (acceptable values are 1-6)

-resolve name

Resolve the name you specify through GNS

-verify name

Check to see if the specified name is advertised through GNS

-parameter name:value
[,name:
value...]

Set the value of one or more configuration parameters

-vip vip_name | ip

Specify a VIP name or IP address on which GNS is to listen

Note: You can modify this attribute using Online Resource Attribute Modification.

-skip

Skip the reachability check of the VIP address

-clientdata file_name

Modifies the GNS client data with client data contained in the specified file

-verbose 

Verbose output


Example

An example of this command is:

$ srvctl modify gns -vip 192.0.2.15

srvctl modify havip

Modifies a highly available VIP (HAVIP) (used for highly available NFS exports).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

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

srvctl modify havip -id havip_name [-address {host_name | ip_address}
    [-netnum network_number] [-skip]] [-description text] [-homenode node_name]

Table A-80 srvctl modify havip Parameters

Parameter Description
-id havip_name

Specify the unique name for the HAVIP resource you want to modify.

-address {host_name |
 ip_address}

Specify either a host name or an IPv4 IP address for the HAVIP you want to modify.

Note: You must configure the IPv4 IP address with a non-DHCP, non-round robin DNS address.

-netnum network_number

Optionally, you can change the network resource upon which the HAVIP depends. The default value for this optional parameter is 1.

-skip

Specify this parameter to skip checking the reachability of the IP address.

-description text

Specify a text description for the HAVIP.

-homenode node_name

Optionally, you can specify a preferred node or an empty string to clear the home node.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

  • Oracle does not support using IPv6 addresses.

Example

An example of this command is:

# srvctl modify havip -id myhavip -address 192.168.16.17 -netnum 2

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.

Notes:

  • You cannot use this command to rename or relocate a running instance.

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

Syntax and Parameters

Use the srvctl modify instance command with the following syntax:

srvctl modify instance -db db_unique_name -instance instance_name
     -node node_name

Table A-81 srvctl modify instance Parameters

Parameter Description
-database db_unique_name

Unique name for the database

-instance instance_name

Database instance name

Note: If you are modifying a policy-managed database instance, then the instance name must contain an underscore (_), such as pmdb1_1.

-node node_name

Name of the node on which to run the instance. You can set the value of this parameter to "" only for a policy-managed database.


Examples

The following example to changes the configuration of an administrator-managed database, amdb, so that the database instance, amdb1, runs on the specified node, mynode:

$ srvctl modify instance -db amdb -instance amdb1 -node mynode

The following example causes the policy-managed database pmdb, when and if it runs on mynode, to use the instance name pmdb1:

$ srvctl modify instance -db pmdb -instance pmdb1_1 -node mynode

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

$ srvctl modify instance -db pmdb -instance pmdb1_1 -node ""

srvctl modify listener

Changes the Oracle home directory from which the listener runs, the name of the operating system user who owns Oracle home directory from which the listener runs, the listener endpoints, or the public subnet on which the listener listens, either for the default listener, or a specific listener, that is registered with Oracle Restart or with Oracle Clusterware.

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

Syntax and Parameters

Use the srvctl modify listener command with the following syntax:

srvctl modify listener [-listener listener_name] [-oraclehome oracle_home] 
 [-user user_name] [-netnum network_number]
 [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]

Table A-82 srvctl modify listener Parameters

Parameter Description
-listener listener_name

The name of the listener.

If you do not specify this parameter, then SRVCTL uses the default name LISTENER.

-oraclehome oracle_home

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

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

-user user_name

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

Note: This parameter can be used only with Oracle Clusterware.

-netnum network_number

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

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

-endpoints "[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.

Note: You can modify this attribute using Online Resource Attribute Modification.


Example

The following example changes the TCP ports for the default listener:

$ srvctl modify listener -endpoints "TCP:1521,1522"

srvctl modify mgmtdb

Modifies the configuration for the management database (CHM repository).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify mgmtdb command with the following syntax:

srvctl modify mgmtdb [-pwfile password_file_path] [-spfile spfile_path]
  [-startoption start_option] [-stopoption stop_option] 
  [-diskgroup "diskgroup_list"]

Table A-83 srvctl modify mgmtdb Parameters

Parameter Description
-pwfile password_file_path

The full path to the location of the password file for the management database.

-spfile spfile_path_name

The path name of the new spfile to be used by the management database

-startoption start_options

Startup options for the management database, such as OPEN, MOUNT, or NOMOUNT

Note: For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

See Also: w for more information about startup options

-stopoption stop_options

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

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-diskgroup "diskgroup_list"

Comma-delimited list of Oracle ASM disk groups used by the management database


Example

The following example directs the management database to use the SYSFILES Oracle ASM disk group.

$ srvctl modify mgmtdb -diskgroup "SYSFILES"

srvctl modify mgmtlsnr

Modifies the configuration for the management listener resource (for CHM).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify mgmtlsnr command with the following syntax:

srvctl modify mgmtlsnr [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name] 
  [/TCPS:s_port][/SDP:port]"]

Table A-84 srvctl modify mgmtlsnr Parameters

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

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

Note: You can modify this attribute using Online Resource Attribute Modification.


Example

The following example changes the TCP ports for the management listener:

$ srvctl modify mgmtlsnr -endpoints "TCP:2521,2522"

srvctl modify network

Modifies the subnet, network type, or IP address type for a network.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

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

srvctl modify network [-netnum network_number] [-subnet subnet/netmask
     [/if1[|if2|...]]] [-nettype network_type | -iptype {ipv4 | ipv6 | both]}
     [-pingtarget "ping_target_list"] [-verbose]

Table A-85 srvctl modify network Parameters

Parameter Description
-netnum network_number

Specify a network number. The default is 1.

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

Specifies a subnet number for the public network. The netmask and interfaces specified, if any, change those of the network you are modifying. If you specify an IPv6 subnet, then enter a prefix length, such as 64, in place of netmask. If you do not specify any interface names, then the VIPs use any interface on the given subnet.

If you are changing the network type using the -nettype parameter, then you must specify either an existing IPv4 or IPv6 network using the -subnet parameter. Additionally, the subnet and netmask you specify in the -subnet parameter do not change those of the network you are modifying.

-nettype network_type

Specify the network type: static, dhcp, autoconfig, or mixed.

-iptype ip_type

The type of IP address: ipv4, ipv6, or both.

-pingtarget "ping_target_list"

Specify a comma-delimited list of IP addresses or host names to ping.

-verbose

Verbose output.


Usage Notes

  • 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.

  • You can modify the IP address type for a network from IPv4 to IPv6, or from IPv6 to IPv4.

  • If you specify static for the network type, then you must provide the virtual IP address using the srvctl add vip command.

  • If you specify dhcp for the network type, then the VIP agent obtains the IP address from a DHCP server.

  • If you specify autoconfig for the network type, then the VIP agent generates a stateless IPv6 address for the network. You can only use this parameter for IPv6 networks. If the subnet/netmask specification is not for an IPv6 address, then SRVCTL returns an error.

  • If you change a network from static to mixed, then you must first configure GNS, so that the dynamic addresses obtained can have names registered for them.

  • If you specify mixed for the network type, then the VIP resource uses both a static IP address and an IP address obtained dynamically, either DHCP or autoconfig.

Examples

The following example changes the subnet number, netmask, and interface list:

# srvctl modify network -subnet 192.168.2.0/255.255.255.0/eth0

The following example changes the second network to DHCP:

# srvctl modify network -netnum 2 -nettype dhcp

The following example adds an IPv6 subnet and netmask to the default network:

# srvctl modify network -subnet 2606:b400:400:18c0::/64

The following example removes the IPv4 configuration from a network:

# srvctl modify network -iptype ipv6

srvctl modify nodeapps

Modifies the configuration for a node application.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify nodeapps command with one of the following syntax models, specifying either a specific node and VIP or a specific subnet and netmask:

srvctl modify nodeapps {[-node node_name -address {vip_name|vip_address}/ 
    netmask[/if1[|if2|...]] [-skip]] [-nettype network_type] [-emport em_port]
    [-onslocalport ons_local_port] [-onsremoteport ons_remote_port] 
    [-remoteservers host:[port][,host:port,...]] [-verbose]
    [-clientdata file] [-pingtarget "ping_target_list"]
srvctl modify nodeapps [-subnet subnet/netmask[/if1[|if2|...]] 
    [-nettype network_type] [-emport em_port] 
    [-onslocalport ons_local_port] [-onsremoteport ons_remote_port]
    [-remoteservers host:[port][,host:port,...]] [-verbose]
    [-clientdata file] [-pingtarget "ping_target_list"]

Table A-86 srvctl modify nodeapps Parameters

Parameter Description
-node node_name

The name of the node on which the node application you want to modify resides.

-address {vip_name|vip_address}/
netmask[/if1[|if2|...]]

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

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

-skip

Specify this parameter to skip checking the reachability of the VIP address.

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

Specifies a subnet number for the public network. The netmask and interfaces specified, if any, change 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.

-nettype network_type

Specifies the network server type, such as static, dhcp, or mixed.

-emport em_port

Local port on which Oracle Enterprise Manager listens.

Note: You can modify this attribute using Online Resource Attribute Modification.

-onslocalport ons_local_port

Port on which the Oracle Notification Service daemon listens for local client connections.

Notes:

  • The local port and remote port must each be unique.

  • You can modify the local port while the resource remains online, without restarting the resource.

-onsremoteport ons_remote_port

Port on which the Oracle Notification Service daemon listens for connections from remote hosts.

Notes:

  • The local port and remote port must each be unique.

  • You can modify the remote port while the resource remains online, without restarting the resource.

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

List of host:port pairs of remote hosts that are part of the Oracle Notification Service 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.

-clientdata file

Specify the file with a wallet to import, or an empty string to delete a wallet used for SSL to secure Oracle Notification Service communication.

-pingtarget "pingtarget_list"

Specify a comma-separated list enclosed in double quotation marks ("") of IPs or host names to ping.

-verbose

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 -node mynode1 -addr 100.200.300.40/255.255.255.0/eth0

srvctl modify oc4j

Modifies the RMI port for the OC4J instances.

Syntax and Parameters

Use the srvctl modify oc4j command with the following syntax:

srvctl modify oc4j -rmiport port_number [-verbose] [-force]

Table A-87 srvctl modify oc4j Parameters

Parameter Description
-rmiport port_number

The RMI port number used by the OC4J instance

Note: You can modify this attribute using Online Resource Attribute Modification.

-verbose

Verbose output

-force

Stops and restarts the resource to effect a change


Example

An example of this command is:

$ srvctl modify oc4j -rmiport 5385

srvctl modify ons

Modifies the ports used by the Oracle Notification Service daemon that is registered with Oracle Restart.

Note:

This command is available only with Oracle Restart.

Syntax and Parameters

Use the srvctl modify ons command with the following syntax:

srvctl modify ons [-onslocalprt ons_local_port] [-onsremoteport ons_remote_port]
     [-emport em_port] [-remoteservers host[:port][,host[:port]][...]] [-verbose]

Table A-88 srvctl modify ons Parameters

Parameter Description
-onslocalport ons_local_port

The Oracle Notification Service daemon listening port for local client connections

Note: The local port and remote port must each be unique.

-onsremoteport ons_remote_port

The Oracle Notification Service daemon listening port for connections from remote hosts

Note: The local port and remote port must each be unique.

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

A list of host:port pairs of remote hosts that are part of the Oracle Notification Service 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.

-verbose

Display verbose output


srvctl modify scan

Modifies the number of SCAN VIPs to match the number of IP addresses returned by looking up the scan_name you specify in DNS. You use this command when DNS was modified to add, change, or remove IP addresses, and now you must adjust the Oracle Clusterware resource configuration to match.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify scan command with the following syntax:

srvctl modify scan -scanname scan_name 

Table A-89 srvctl modify scan Parameters

Parameter Description
-scanname scan_name

Identifies the SCAN name that resolves to the SCAN VIPs that you want to modify.

Note: You can modify this attribute using Online Resource Attribute Modification.


Example

Assume your system currently has a SCAN named scan_name1, and it resolves to a single IP address in DNS. If you modify the SCAN scan_name1 in DNS to resolve to three IP addresses, then use the following command to create the additional SCAN VIP resources:

$ srvctl modify scan -scanname scan_name1

srvctl modify scan_listener

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

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify scan_listener command with the following syntax:

srvctl modify scan_listener {-update | -endpoints [TCP:]port[/IPC:key]
     [/NMP:pipe_name][/TCPS:s_port][/SDP:port] } [-invitednodes node_list]
     [-invitedsubnets subnet_list]

Table A-90 srvctl modify scan_listener Parameters

Parameter Description
-update

Use this parameter to update SCAN listener configuration to match the current SCAN VIP configuration. This parameter adds new resources or removes existing SCAN listener resources to match the SCAN VIP resources.

-endpoints [TCP:]port[/IPC:key]
[/NMP:pipe_name]
[/TCPS:s_port][/SDP:port]

Use this parameter to change SCAN listener end points.

Note: You can modify this attribute using Online Resource Attribute Modification.

-invitednodes node_list

Use this parameter to specify a comma-delimited list of host names from outside the cluster that are allowed to register with the SCAN listener.

-invitedsubnets subnet_list

Use this parameter to specify a comma-delimited list of subnets from outside the cluster that are allowed to register with the SCAN listener.


Example

Assume your system currently has a SCAN named scan_name1, and you recently modified the DNS entry to resolve to three IP addresses instead of one. After running the srvctl modify scan command to create additional SCAN VIP resources, use the following command to create Oracle Clusterware resources for the additional two SCAN listeners to go with the two additional SCAN VIPs:

$ srvctl modify scan_listener -update

srvctl modify service

This command supports some online modifications to the service, such as:

  • Moving a service member from one instance to another

  • Performing online changes to service attributes from DBMS_SERVICE (for example, failover delay, runtime load balancing goal, and so on)

  • Adding a new preferred or available instance

  • Removing preferred or available instances for a 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.

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:

srvctl modify service -db db_unique_name -service service_name 
      -oldinst old_instance_name -newinst new_instance_name [-force]

Note:

This form of the command is only available with Oracle Clusterware.

Table A-91 srvctl modify service Parameters for Moving a Service

Parameter Description
-database db_unique_name

Unique name for the database

-service service_name

Service name

-oldinst old_instance_name

Old instance name

-newinst new_instance_name

New instance name

-force

Disconnect all sessions during stop or relocate service operations


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

srvctl modify service -db db_unique_name -service service_name 
      -available avail_inst_name -toprefer [-force]

Note:

This form of the command is only available with Oracle Clusterware and does not accept placement parameters for Oracle RAC One Node databases.

Table A-92 srvctl modify service Parameters for Changing to a Preferred Instance

Parameter Description
-db db_unique_name

Unique name for the database.

-service service_name

Specify the name of the service you want to modify.

-available available_inst_name

Name of the available instance to change.

-toprefer

Change instance status to preferred.

-force

Disconnect all sessions during stop or relocate service operations. For planned operations, the user experience is best if using an Oracle Connection Pool with FAN, and not forcing disconnect. The FAN planned event causes the Oracle pool to drain the requests with no interruption to the users.


To change the available and preferred status for multiple instances:

srvctl modify service -db db_unique_name -service service_name 
     -modifyconfig -preferred "preferred_list" [-available "available_list"]
     [-force]

Note:

This form of the command is only available with Oracle Clusterware and does not accept placement parameters for Oracle RAC One Node databases.

Table A-93 srvctl modify service Parameters for Changing Status of Multiple Instances

Parameter Description
-db db_unique_name

Unique name for the database

-service service_name

Service name

-modifyconfig

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

-preferred "preferred_instance_list"

Comma-delimited list of preferred instances

-available "available_instance_list"

Comma-delimited list of available instances

-force

Disconnect all sessions during stop or relocate service operations.

For planned operations, the user experience is best if using an Oracle Connection Pool with FAN, and not forcing disconnect. The FAN planned event causes the connection pool to drain the requests with no interruption to the users.


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

srvctl modify service -db db_unique_name -service service_name [-eval]
 [-serverpool pool_name] [-cardinality {UNIFORM|SINGLETON}]
 [-pqservice pqsvc_name] [-pqpool pq_pool_list]
 [-tafpolicy {BASIC|NONE}] [-edition edition_name]
 [-role "[PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"]
 [-notification {TRUE|FALSE}]  [-dtp {TRUE|FALSE}]
 [-clbgoal {SHORT|LONG}] [-rlbgoal {NONE|SERVICE_TIME|THROUGHPUT}]
 [-failovertype {NONE|SESSION|SELECT|TRANSACTION}] [-failovermethod {NONE|BASIC}]
 [-failoverretry failover_retries] [-failoverdelay failover_delay] 
 [-policy {AUTOMATIC | MANUAL}] [-pdb pluggable_database] 
 [-sql_translation_profile profile_name] [-commit_outcome {TRUE|FALSE}] 
 [-retention retention_time] [-replay_init_time replay_initiation_time] 
 [-session_state {STATIC|DYNAMIC}] [-global_override] [-verbose] [-force]

Table A-94 srvctl modify service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service service_name

Service name

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

Note: You can only use this parameter with a policy-managed service.

-serverpool pool_name

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

Note: This parameter can be used only with Oracle RAC and only for policy-managed databases.

-cardinality {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 parameter can be used only with Oracle Clusterware.

-pqservice pqsvc_name

Comma-delimited list of parallel query service names

-pqpool pq_pool_list

Comma-delimited list of parallel query server pool names

-tafpolicy
 {BASIC|NONE}

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

-edition edition_name

The initial session edition of the service.

When an edition is specified for a service, all subsequent connections that specify the service use this edition as the initial session edition. However, if a session connection specifies a different edition, then the edition specified in the session connection is used for the initial session edition.

SRVCTL does not validate the specified edition name. During connection, the connect user must have USE privilege on the specified edition. If the edition does not exist or if the connect user does not have USE privilege on the specified edition, then an error is raised.

-role "[PRIMARY]
 [,PHYSICAL_STANDBY]
 [,LOGICAL_STANDBY]
 [,SNAPSHOT_STANDBY]"

The database modes for which the service should be started automatically. You can specify one or more roles in a comma-delimited list.

-notification {TRUE | FALSE}

Enable Fast Application Notification (FAN) for OCI connections

-dtp {TRUE | FALSE}

Indicates whether Distributed Transaction Processing should be enabled for this service. This ensures that the service is offered at exactly one instance at a time for XA affinity.

-clbgoal {SHORT | LONG}

For connection load balancing goal: set to SHORT if using runtime load balancing, set to LONG for long running connections such as batch jobs or older SQL*Forms style.

-rlbgoal {NONE |
 SERVICE_TIME | THROUGHPUT}

Runtime Load Balancing Goal. Set this parameter to SERVICE_TIME to balance connections by response time. Set this parameter to THROUGHPUT to balance connections by throughput.

-failovertype {NONE |
 SESSION | SELECT | TRANSACTION}

Failover type

To enable Application Continuity for Java, set this parameter to TRANSACTION. To enable Transparent Application Failover (TAF) for OCI, set this parameter to SELECT or SESSION.

-failovermethod {NONE | BASIC}

TAF failover method (for backward compatibility only).

-failoverretry
 failover_retries

For Application Continuity and TAF, the number of attempts to connect after an incident.

-failoverdelay
 failover_delay

For Application Continuity and TAF, the time delay (in seconds) between reconnect attempts per incident at failover.

-policy {AUTOMATIC | MANUAL}

Service management policy.

-pdb pluggable_database

Pluggable database (PDB) name.

Note: You can specify a PDB property when you create or modify a service. The PDB property associates the service with the specified PDB. You can view the PDB property for a service by querying the ALL_SERVICES data dictionary view or, when using the SRVCTL utility, by running the srvctl config service command.

When create or modify a service with the specified PDB, SRVCTL does not check if the PDB exists.Before running this command, you must ensure that the PDB exists.

-sql_translation_profile
 profile_name

Use this parameter to specify a SQL translation profile for a service that you are modifying after you have migrated applications from a non-Oracle database to an Oracle database.

If you want to set the SQL translation profile to a NULL value, then you must enter an empty string after the -p flag.

Note: Before using the SQL translation feature, you must migrate all server-side application objects and data to the Oracle database.

See Also: Oracle Database Migration Guide for more information about SQL translation

-commit_outcome {TRUE|FALSE}

Enable Transaction Guard; when set to TRUE, the commit outcome for a transaction is accessible after the transaction's session fails due to a recoverable outage.

-retention retention_time

For Transaction Guard (commit_outcome set to TRUE), this parameter determines the amount of time (in seconds) that the commit outcome is retained in the database.

-replay_init_time
 replay_init_time

For Application Continuity, this parameter specifies the time, in seconds, from when the original request started execution. Application Continuity will not replay after the specified amount of time has passed. This attribute avoids the unintentional replay of a request when a system is recovered after a long period. The default value is 300 (5 minutes).

-session_state
 {STATIC|DYNAMIC}

For Application Continuity, this parameter specifies whether the session state that is not transactional is changed by the application. Oracle recommends a value of DYNAMIC for most applications. If you are unsure which value to use or you can customize the application, then use DYNAMIC. STATIC mode is on request for database-agnostic applications, that never change non-transactional state inside a request.

-global_override
 global_override

Override value to modify the global service attributes.

This parameter is used with the -role, -policy, -notification, -failovertype, -failovermethod, -failoverdelay, -failoverretry and -edition parameters.

-verbose

Display verbose output.

-force

Force the modify operation, stopping the service on some nodes as necessary.


Usage Notes

  • When performing online changes to service attributes (for example, failover delay, Runtime Load Balancing Goal, and so on), the changes take effect only when the service is next (re)started.

  • When a service configuration is modified so that a new preferred or available instance is added, the running state of the existing service is not affected. However, the newly added instances will not automatically provide the service, until a srvctl start service command is issued.

  • When there are available instances for the service, and the service configuration is modified so that a preferred or available instance is removed, the running state of the service may change unpredictably:

    • The service is stopped and then removed on some instances according to the new service configuration.

    • The service may be running on some instances that are being removed from the service configuration.

    • These services will be relocated to the next free instance in the new service configuration.

Because 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.

Examples

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

$ srvctl modify service -db crm -service crm -oldinst crm1 -newinst crm2

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

$ srvctl modify service -db crm -service crm -available crm1 -toprefer

The following command exchanges a preferred and available instance:

$ srvctl modify service -db crm -service crm -modifyconfig -preferred "crm1" \
-available "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 Parameters

Use the srvctl modify srvpool command with the following syntax:

srvctl modify srvpool -serverpool pool_name [-eval] [-importance importance] 
     [-min min_size] [-max max_size] [-servers "server_list"]
     [-category "server_category"] [-verbose] [-force]

Table A-95 srvctl modify srvpool Parameters

Parameter Description
-serverpool pool_name

The name of the server pool to modify,

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-importance importance

The new importance of the server pool.

-min min_size

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

-max max_size

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

-servers "server_list"

A comma-delimited list of candidate server names.

Note: In Oracle Database 12c, servers are assigned to server pools according to the value of the -category parameter.

-category "server_category"

Server category (or "" for empty category value).

-verbose

Display verbose output

-force

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:

$ srvctl modify srvpool -serverpool srvpool1 -importance 0 -min 2 -max 4

srvctl modify vip

Modifies IP address type but you can also use it to modify just the IP address.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify vip command with the following syntax:

srvctl modify vip -node node_name -address {VIP_name|ip}/netmask[/if1[|if2|...]]
     [-netnum network_number] [-verbose]

Table A-96 srvctl modify vip Parameters

Parameter Description
-node node_name

The name of the node on which you are changing the VIP.

-address {VIP_name|ip}/netmask
[/if1[|if2|...]]

Use this parameter to change the configuration of an existing VIP. If the VIP has an IPv4 address and the address you specify is IPv6, and the IP address type is set to both and the network type is set to static, then SRVCTL adds the IPv6 address to the existing IPv4 address of that resource.

You can specify one VIP_name or IP address, along with an IPv4 netmask or IPv6 prefix length.

-netnum network_number

The optional network number from which VIPs are obtained.

If you do not specify this parameter, then the VIPs are obtained from the same default network from which the nodeapps VIP is obtained.

-verbose

Verbose output


Note:

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

Example

The following example adds an IPv4 address to a VIP, if one does not already exist. If the VIP has an IPv4 address, then it is replaced with the new network specification.

# srvctl modify vip -node node7 -address 192.168.16.17/255.255.255.0 -netnum 2

predict

The predict command predicts what happens when a resource fails and cannot be restarted on the same node. This command does not make any modifications to the system.

Table A-97 srvctl predict Summary

Command Description

srvctl predict asm

Predicts the consequences of Oracle ASM failure

srvctl predict database

Predicts the consequences of database failure

srvctl predict diskgroup

Predicts the consequences of diskgroup failure

srvctl predict filesystem

Predicts the consequences of filesystem failure

srvctl predict listener

Predicts the consequences of listener failure

srvctl predict network

Predicts the consequences of network failure

srvctl predict oc4j

Predicts the consequences of OC4J failure

srvctl predict scan

Predicts the consequences of SCAN failure

srvctl predict scan_listener

Predicts the consequences of SCAN listener failure

srvctl predict service

Predicts the consequences of service failure

srvctl predict vip

Predicts the consequences of VIP failure


srvctl predict asm

Predicts the consequences of ASM failure.

Syntax and Parameters

Use the srvctl predict asm command with the following syntax:

srvctl predict asm [-node node_name] [-verbose]

Table A-98 srvctl predict asm Parameters

Parameter Description
-node node_name

Node name

-verbose

Display verbose output


Examples

An example of this command to predict the consequences of an Oracle ASM failure:

$ srvctl predict asm -node crmnode2

srvctl predict database

The srvctl predict database command predicts what happens if the specified database fails.

Syntax and Parameters

Use the srvctl predict database command with the following syntax:

srvctl predict database -db db_unique_name [-verbose]

Table A-99 srvctl predict database Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-verbose

Verbose output.


Example

The following example predicts what happens if the database named racdb fails:

srvctl predict database -db racdb

srvctl predict diskgroup

Predicts the consequences of and Oracle ASM disk group failure.

Syntax and Parameters

Use the srvctl predict diskgroup command with the following syntax:

srvctl predict diskgroup -diskgroup diskgroup_name [-verbose]

Table A-100 srvctl predict diskgroup Parameters

Parameter Description
-diskgroup diskgroup_name

The name of the Oracle ASM disk group for which you want to evaluate failure

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl predict diskgroup -diskgroup data

srvctl predict filesystem

Predicts the consequences of file system failure.

Syntax and Parameters

Use the srvctl predict filesystem command with the following syntax:

srvctl predict filesystem -device volume_device_name [-verbose]

Table A-101 srvctl predict filesystem Parameters

Parameter Description
-device volume_device_name

The path name of the filesystem volume device.

-verbose

Display verbose output.


Example

An example of this command is:

srvctl predict filesystem -device /dev/asm/volume1-123

srvctl predict listener

Predicts the consequences of listener failure.

Syntax and Parameters

Use the srvctl predict listener command with the following syntax:

srvctl predict listener listener_name [-verbose]

Table A-102 srvctl predict listener Parameters

Parameter Description
-listener listener_name

Specify the name of the listener for which you want to predict the consequences of a failure.

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl predict listener -listener NODE3_CRMAPP_LISTENER

srvctl predict network

Predicts the consequences of network failure.

Syntax and Parameters

Use the srvctl predict network command with the following syntax:

srvctl predict network [-netnum network_number [-verbose]

Table A-103 srvctl predict network Parameters

Parameter Description
-netnum network_number

Specify the network for which you want to evaluate failure. The default value is 1.

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl predict network -netnum 2

srvctl predict oc4j

Predicts the consequences of Oracle Container for Java (OC4J) failure.

Syntax and Parameters

Use the srvctl predict oc4j command with the following syntax:

srvctl predict oc4j [-verbose]

Table A-104 srvctl predict oc4j Parameters

Parameter Description

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl predict oc4j

srvctl predict scan

Predicts the consequences of SCAN failure.

Syntax and Parameters

Use the srvctl predict scan command with the following syntax:

srvctl predict scan -scannumber ordinal_number [-verbose]

Table A-105 srvctl predict scan Parameters

Parameter Description
-scannumber ordinal_number

An ordinal number that identifies the SCAN VIP for which you want to simulate failure. The range of values you can specify for this parameter is 1 to 3.

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl predict scan -scannumber 1 -verbose

srvctl predict scan_listener

Predicts the consequences of SCAN listener failure.

Syntax and Parameters

Use the srvctl predict scan_listener command with the following syntax:

srvctl predict scan_listener -scannumber ordinal_number [-verbose]

Table A-106 srvctl predict scan_listener Parameters

Parameter Description
-scannumber ordinal_number

An ordinal number that identifies the SCAN listener. The range of values you can specify for this parameter is 1 to 3.

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl predict scan_listener -scannumber 1

srvctl predict service

Predicts the consequences of service failure.

Syntax and Parameters

Use the srvctl predict service command with the following syntax:

srvctl predict service -db db_unique_name -service service_name [-verbose]

Table A-107 srvctl predict service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service "service_name,..."

Comma-delimited list of service names

-verbose

Display verbose output


Example

To evaluate the consequences of failure of the service named crm for the database racdb:

$ srvctl predict service -db racdb -service "crm"

srvctl predict vip

Predicts the consequences of VIP failure.

Syntax and Options

Use the srvctl predict vip command with the following syntax:

srvctl predict vip [-vip vip_name] [-verbose]

Table A-108 srvctl predict vip Parameters

Parameter Description
-vip vip_name

Specify the name of the VIP for which you want to evaluate the consequences of failure.

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl predict vip -vip racdb1_vip

relocate

The relocate command causes the specified object to run on a different node. The specified object must be running already.

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

Table A-109 srvctl relocate Summary

Command Description

srvctl relocate asm

Relocate an Oracle Flex ASM instance from one node of an Oracle Flex Cluster to another

srvctl relocate cvu

Temporarily relocates the Cluster Verification Utility

srvctl relocate database

Relocates an Oracle RAC One Node database to a different node

srvctl relocate gns

Relocates GNS to a different node

srvctl relocate havip

Relocates a highly available VIP resource

 

srvctl relocate mgmtdb

Relocates the management database to a different node

srvctl relocate oc4j

Relocates an OC4J instance to a different 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 vip

Relocates a specific VIP from one node to another node within the cluster


srvctl relocate asm

Relocates an Oracle Flex ASM instance from one Hub Node of an Oracle Flex Cluster to another.

Syntax and Parameters

Use the srvctl relocate asm command with the following syntax:

srvctl relocate asm -currentnode current_node [-targetnode target_node] [-force]

Table A-110 srvctl relocate asm Parameters

Parameter Description
-currentnode current_node

Name of the node on which the Oracle Flex ASM instance currently resides

-targetnode current_node

Name of the node to which you want to relocate the Oracle Flex ASM instance

-force

Force the relocation of the Oracle Flex ASM instance


Usage Notes

You cannot use this command if there is only one Oracle Flex ASM instance running.

Example

An example of this command to relocate an Oracle Flex ASM instance from the current node to a node named hubnode2 is:

$ srvctl relocate asm -currentnode hubnode1 -targetnode hubnode2

srvctl relocate cvu

Temporarily relocates the CVU to another node in a cluster.

Syntax and Parameters

Use the srvctl relocate cvu command with the following syntax:

srvctl relocate cvu [-node node_name]

Table A-111 srvctl relocate cvu Parameters

Parameter Description
-node node_name

Node name


Example

An example of this command to temporarily relocate CVU from the local node to the cluster node named crmnode2 is:

$ srvctl relocate cvu -node crmnode2

srvctl relocate database

The srvctl relocate database command initiates the relocation of an Oracle RAC One Node database from one node to another node. This command also cleans up after a failed relocation.

The srvctl relocate database command can only be used for relocating Oracle RAC One Node databases.

Syntax and Parameters

Use the srvctl relocate database command with one of these syntax models:

srvctl relocate database -db db_unique_name [-node target_node]
     [-timeout timeout] [-stopoption NORMAL] [-verbose]

srvctl relocate database -db db_unique_name -abort [-revert] [-verbose]

Table A-112 srvctl relocate database Parameters

Parameter Description
-db db_unique_name

Unique name of the database to relocate.

-node target

Target node to which to relocate the Oracle RAC One Node database.

Note: You must supply this parameter if you are relocating an administrator-managed Oracle RAC One Node database.

-timeout timeout

Online database relocation timeout, in minutes, for Oracle RAC One Node databases. The default is 30.

-stopoption NORMAL

Use this parameter to shut down an existing database instance using SHUTDOWN NORMAL instead of the default of SHUTDOWN TRANSACTIONAL LOCAL for a primary database or SHUTDOWN IMMEDIATE for a standby database.

-abort

Abort failed online database relocation.

-revert

Removes the target node of a failed online relocation request from the candidate server list of an administrator-managed Oracle RAC One Node database.

-verbose

Verbose output.


Usage Notes

  • If the Oracle RAC One Node database you want to relocate is not running, then the command returns an error.

  • If another online database relocation is active for this Oracle RAC One Node database, then the command returns an error.

  • If an online database relocation for this Oracle RAC One Node database has failed and the target nodes are not the same for either relocation, then the command returns an error instructing you to abort the failed online database relocation and then initiate a new one.

  • If an online database relocation for this Oracle RAC One Node database has failed and the target nodes are the same (or you do not specify the target), then the command attempts to relocate the database.

Example

The following example relocates an administrator-managed Oracle RAC One Node database named rac1 to a server called node7.

srvctl relocate database -db rac1 -node node7

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 Parameters

Use the srvctl relocate gns command with the following syntax:

srvctl relocate gns [-node node_name] [-verbose]

Table A-113 srvctl relocate gns Parameters

Parameter Description
-node node_name

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

-verbose

Display verbose output.


Usage Notes

  • 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 relocate gns -node node1

srvctl relocate havip

Relocates a highly available VIP (HAVIP) (used for highly available NFS exports) to another node in a cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl relocate havip command with the following syntax:

srvctl relocate havip -id havip_name [-node node_name] [-force]

Table A-114 srvctl relocate havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to relocate.

-node node_name

Specify the name of the node to which you want to relocate the HAVIP resource.

-force

Optionally, you can force the relocation of the HAVIP resource.


Example

An example of this command is:

$ srvctl relocate havip -id myhavip -node node3

srvctl relocate mgmtdb

Relocates the management database (CHM repository) resource from one node of the cluster to another.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl relocate mgmtdb command with the following syntax:

srvctl relocate mgmtdb [-node node_name]

Specify a node to which you want to relocate the management database.

Example

An example of this command is:

$ srvctl relocate mgmtdb -node crsNode2

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 Parameters

Use the srvctl relocate oc4j command with the following syntax:

srvctl relocate oc4j [-node node_name] [-verbose]

Table A-115 srvctl relocate oc4j Parameters

Parameter Description
-node node_name

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

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl relocate oc4j -node crsNode01 -verbose

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 Parameters

Use the srvctl relocate scan command with the following syntax:

srvctl relocate scan -scannumber ordinal_number [-node node_name]

Table A-116 srvctl relocate scan Parameters

Parameter Description
-scannumber ordinal_number

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

-node node_name

The name of a single node.

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


Example

An example of this command is:

$ srvctl relocate scan -scannumber 1 -node 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 Parameters

Use the srvctl relocate scan_listener command with the following syntax:

srvctl relocate scan_listener -scannumber ordinal_number [-node node_name]

Table A-117 srvctl relocate scan_listener Parameters

Parameter Description
-scannumber ordinal_number

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

-node node_name

The name of a single node.

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


Example

An example of this command is:

$ srvctl relocate scan_listener -scannumber 3

srvctl relocate server

Relocates servers to a server pool in the cluster.

Syntax and Parameters

Use the srvctl relocate server command with the following syntax:

srvctl relocate server -servers "server_name_list" -serverpool pool_name
     [-eval] [-force]

Table A-118 srvctl relocate server Parameters

Parameter Description
-servers "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.

-serverpool pool_name

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

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-force

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


Example

An example of this command is:

$ srvctl relocate server -servers "server1, server2" -serverpool sp3

srvctl relocate service

Temporarily relocates the specified service names from one specified instance to another specified instance. The srvctl relocate service 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.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl relocate service command with the following syntax:

srvctl relocate service -db db_unique_name -service service_name {-oldinst 
    old_inst_name -newinst new_inst_name | -currentnode source_node -targetnode target_node}
    [-pq] [-force [noreplay]] [-eval] [-verbose]

Table A-119 srvctl relocate service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service service_name

Service name

-oldinst old_instance_name

Old instance name

-newinst new_instance_name

New instance name

Note: If you are using an administrator-managed, then you must use the -oldinst and -newinst parameters and the target instance must be on the preferred or available list for the service.

-currentnode source_node

Name of the node where the service is currently running

-targetnode target_node

Name of node where the service should be relocated

Note: If you are using a policy-managed, then you must use the -currentnode and -targetnode parameters.

-pq

Performs the action on a parallel query service

-force

Disconnect all sessions during stop or relocate service operations

-noreplay

Disables session replay during disconnection

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system

-verbose

Verbose output


Example

To temporarily relocate a named service member for the crm service from the database instance crm1 to the database instance crm3:

$ srvctl relocate service -db crm -service crm -oldinst crm1 -newinst crm3

srvctl relocate vip

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

Syntax and Options

Use the srvctl relocate vip command with the following syntax:

srvctl relocate vip -vip vip_name [-node node_name] [-force] [-verbose]

Table A-120 srvctl relocate vip Parameters

Parameter Description
-vip vip_name

Specify the name of the VIP you want to relocate.

-node node_name

Specify the name of the target node where the VIP should be relocated.

-force

Specify this option to force the relocation of the VIP.

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl relocate vip -vip vip1 -node node3

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, Oracle Notification Service, and listeners.

If you do not use the force parameter (-force), then Oracle Clusterware or Oracle Restart prompts you to confirm whether to proceed. If you use -force, 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 parameter (-force) 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-121 srvctl remove Summary

Command Description

srvctl remove asm

Removes Oracle ASM instances

srvctl remove cvu

Removes the Cluster Verification Utility configured for the cluster

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 filesystem

Removes the configuration for an Oracle ACFS volume

srvctl remove gns

Removes GNS

srvctl remove havip

Removes a highly available VIP

srvctl remove instance

Removes instances and configurations of administrator-managed databases

 

srvctl remove listener

Removes the configuration of the specified listener from Oracle Clusterware or Oracle Restart

srvctl remove mgmtdb

Removes the management database from Oracle Clusterware

srvctl remove mgmtlsnr

Removes the management database listener from Oracle Clusterware

srvctl remove network

Removes a network from the cluster configuration

srvctl remove nodeapps

Removes node applications

srvctl remove oc4j

Removes the OC4J instance configuration

srvctl remove ons

Removes Oracle Notification Service 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 volume

Removes a specific volume


srvctl remove asm

Removes the Oracle ASM resource from Oracle Clusterware management.

Note:

To manage Oracle ASM on Oracle Database 12c 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 Parameters

Use the srvctl remove asm command with the following syntax:

srvctl remove asm [-proxy] [-force]

Table A-122 srvctl remove asm Parameters

Parameter Description
-proxy

Specifies whether the Oracle ASM instance to remove is a proxy instance.

-force

Forcefully removes an Oracle ASM resource (ignores any dependencies)


Example

An example of this command is:

$ srvctl remove asm -force

srvctl remove cvu

Removes CVU from an Oracle Clusterware configuration.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove cvu command with the following syntax:

srvctl remove cvu [-force]

Use the -force parameter to remove a CVU resource that is running or starting.

Examples

An example of this command to remove CVU is:

$ srvctl remove cvu -force

srvctl remove database

Removes a database configuration.

Syntax and Parameters

Use the srvctl remove database command with the following syntax:

srvctl remove database -db db_unique_name [-force] [-noprompt] [-verbose]

Table A-123 srvctl remove database Parameters

Parameter Description
-database db_unique_name

Unique name for the database

-force

Force remove (ignore dependencies)

-noprompt

Suppress prompts

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl remove database -db crm

srvctl remove diskgroup

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

Syntax and Parameters

Use the srvctl remove diskgroup command with the following syntax:

srvctl remove diskgroup -diskgroup diskgroup_name [-force]

Table A-124 srvctl remove diskgroup Parameters

Parameter Description
-diskgroup diskgroup_name

The Oracle ASM disk group name.

-force

Force remove (ignore dependencies)


Example

An example of this command is:

$ srvctl remove diskgroup -diskgroup DG1 -force

srvctl remove filesystem

Removes a specific file system resource from the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove filesystem command with the following syntax:

srvctl remove filesystem -device volume_device_name [-force]

Table A-125 srvctl remove filesystem Parameters

Parameter Description
-device volume_device

Specify the path to the file system resource device you want to remove.

-force

Ignores the resource dependencies and forcibly removes the resource from the cluster.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms, or as an Administrator user on Windows platforms.

Example

An example of this command is:

# srvctl remove filesystem -device /dev/asm/racvol1

srvctl remove gns

Removes GNS from the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove gns command with the following syntax:

srvctl remove gns [-force] [-verbose]

Table A-126 srvctl remove gns Parameters

Parameter Description
-force

Forcibly remove GNS from the cluster regardless of any errors that might occur.

-verbose

Display verbose output.


Example

An example of this command is:

$ srvctl remove gns

srvctl remove havip

Removes a highly available VIP (HAVIP) (used for highly available NFS exports).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove havip command with the following syntax:

srvctl remove havip -id havip_name [-force]

Table A-127 srvctl remove havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to remove.

-force

Forcibly removes the resource from the cluster ignoring any dependencies.


Usage Notes
  • You must first stop the HAVIP resource before you attempt to remove it.

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

# srvctl remove havip -id myhavip

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 -force parameter, 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.

Notes:

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

  • If you attempt to use this command on an Oracle RAC One Node database, then the command returns an error stating that cannot remove the instance except by removing the database.

Syntax and Parameters

Use the srvctl remove instance command with the following syntax:

srvctl remove instance -db db_unique_name -instance instance_name
     [-noprompt] [-force]

Table A-128 srvctl remove instance Parameters

Parameter Description
-db db_unique_name

Unique name for the administrator-managed database.

-instance instance_name

Instance name.

-noprompt

Suppress prompts

-force

Specify this parameter to skip checking that the instance is not running, and remove it even though it is running. This parameter 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 -db crm -instance crm01

srvctl remove listener

Removes the configuration of a specific listener or all listeners from Oracle Clusterware or Oracle Restart.

Syntax and Parameters

Use the srvctl remove listener command with the following syntax:

srvctl remove listener [-listener listener_name | -all] [-force]

Table A-129 srvctl remove listener Parameters

Parameter Description
-listener listener_name

Name of the listener that you want to remove.

If you do not specify a listener name, then the listener name defaults to LISTENER for a database listener; LISTENER_ASM for an Oracle ASM listener; or LISTENER_LEAF for a Leaf Node listener.

-all

Removes all listener configurations.

-force

Specify this parameter 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 configuration for the listener named lsnr01:

$ srvctl remove listener -listener lsnr01

srvctl remove mgmtdb

Removes the management database (CHM repository) from Oracle Clusterware management.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove mgmtdb command with the following syntax:

srvctl remove mgmtdb [-force] [-noprompt] [-verbose]

Table A-130 srvctl remove mgmtdb Parameters

Parameter Description
-force

Forcibly remove the management database from the cluster regardless of any errors that might occur.

-noprompt

Suppress prompts

-verbose

Display verbose output.


Usage Notes

  • You must first attempt to shut down the management database before you attempt to remove it.

Example

An example of this command is:

$ srvctl remove mgmtdb -noprompt

srvctl remove mgmtlsnr

Use this command to remove the management listener resource (for CHM) from Oracle Clusterware.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove mgmtlsnr command with the following syntax:

srvctl remove mgmtlsnr [-force]

Use the -force parameter to forcibly remove the management listener, ignoring any dependencies.

Example

An example of this command is:

srvctl remove mgmtlsnr

srvctl remove network

Removes the network 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 and Parameters

Use the srvctl remove network command as follows:

srvctl remove network {-netnum network_number | -all} [-force] [-verbose]

Table A-131 srvctl remove network Parameters

Parameter Description
-netnum network_number

Specifies which network to remove

-all

Remove all networks

-force

Force remove the networks

-verbose

Verbose output


Example

An example of this command is:

# srvctl remove network -netnum 3

srvctl remove nodeapps

Removes the node application configuration.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove nodeapps command as follows:

srvctl remove nodeapps [-force] [-noprompt] [-verbose]

Table A-132 srvctl remove nodeapps Parameters

Parameter Description
-force

Force remove

-noprompt

Suppress prompts

-verbose

Verbose output


Usage Notes

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.

Example

An example of this command is:

# srvctl remove nodeapps

srvctl remove oc4j

Removes the OC4J instance from the Oracle Clusterware configuration.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove oc4j command with the following syntax:

srvctl remove oc4j [-force] [-verbose]

Table A-133 srvctl remove oc4j Parameters

Parameter Description
-force

Force remove

-verbose

Verbose output


srvctl remove ons

Removes Oracle Notification Service from the Oracle Grid Infrastructure home.

Note:

This command is only available with Oracle Restart.

Syntax and Parameters

Use the srvctl remove ons command with the following syntax:

srvctl remove ons [-force] [-verbose]

Table A-134 srvctl remove ons Parameters

Parameter Description
-force

Force remove

-verbose

Verbose output


srvctl remove scan

Removes Oracle Clusterware resources from all SCAN VIPs.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove scan command with the following syntax:

srvctl remove scan [-force] [-noprompt]

Table A-135 srvctl remove scan Parameters

Parameter Description
-force

Removes the SCAN VIPs even though there are SCAN listeners running that are dependent on the SCAN VIPs.

-noprompt

Suppress all prompts


Usage Notes

If you use the -force option, then SCAN VIPs that are running are not stopped before the dependent resources are removed, which may require manual cleanup.

Example

An example of this command is:

$ srvctl remove scan -force

srvctl remove scan_listener

Removes Oracle Clusterware resources from all SCAN listeners.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove scan_listener command with the following syntax:

srvctl remove scan_listener [-force] [-noprompt]

Table A-136 srvctl remove scan_listener Parameters

Parameter Description
-force

Removes the SCAN listener without stopping the SCAN listener if it is running

-noprompt

Suppress all prompts


Example

An example of this command is:

$ srvctl remove scan_listener -force

srvctl remove service

Removes the configuration for a service.

Syntax and Parameters

Use the srvctl remove service command as follows:

srvctl remove service -db db_unique_name -service service_name 
    [-instance instance_name] [-global_override]

Table A-137 srvctl remove service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service service_name

Service name

-instance instance_name

Instance name of an administrator-managed database.

Note: This parameter can be used only for Oracle Clusterware.

-global_override

Override value to operate on a global service. This parameter is ignored for a non-global service.


Examples

This command removes the sales service from all instances of the clustered database named crm:

$ srvctl remove service -db crm -service sales

The following example removes the sales service from a specific instance of the crm clustered database:

$ srvctl remove service -db crm -service sales -instance crm02

srvctl remove srvpool

Removes a specific server pool. If there are databases or services that depend upon this server pool, then those resources are removed from the server pool first so that the remove server pool operation succeeds.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove srvpool command with the following syntax:

srvctl remove srvpool -serverpool pool_name [-eval] [-verbose]

Table A-138 srvctl remove srvpool Parameters

Parameter Description
-eval

Evaluates the effects of removing a server pool without making any changes to the system.

-verbose

Display verbose output.


Usage Notes

If you successfully remove the specified 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.

Example

An example of this command is:

$ srvctl remove srvpool -serverpool srvpool1

srvctl remove vip

Removes specific VIPs.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl remove vip command with the following syntax:

srvctl remove vip -vip "vip_name_list" [-force] [-noprompt] [-verbose]

Table A-139 srvctl remove vip Parameters

Parameter Description
-vip "vip_name_list"

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

-force

Force remove

-noprompt

Suppress prompts

-verbose

Verbose output


Example

An example of this command is:

$ srvctl remove vip -vip "vip1,vip2,vip3" -force -noprompt -verbose

srvctl remove volume

Removes a specific volume.

Notes:

  • This command is only available with Oracle Clusterware.

  • The volume gets created when you create volumes in Oracle ASM.

See Also:

Oracle Automatic Storage Management Administrator's Guide for more information about creating volumes

Syntax and Parameters

Use the srvctl remove volume command with one of these syntax models:

srvctl remove volume -volume volume_name -diskgroup disk_group_name [-force]

srvctl remove volume -device volume_device [-force]

Table A-140 srvctl remove volume Parameters

Parameter Description
-volume volume_name

Specify the name of the volume that you want to remove. This parameter is required.

-diskgroup disk_group_name

Specify the name of the disk group in which the volume that you want to remove resides.

-device volume_device

Specify the path to the file system resource in which the volume that you want to remove resides.

-force

Removes the volume even if it is running.


Usage Notes

You must specify a particular volume that you want to remove. You can specify a volume that resides in either a particular disk group or on a particular volume device.

Example

The following example removes a volume named VOLUME1 that resides in a disk group named DATA:

$ srvctl remove volume -volume VOLUME1 -diskgroup DATA

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-141 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 mgmtdb

Administers environment configuration for the management database

srvctl setenv mgmtlsnr

Administers environment configuration for the management listener

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 Parameters

Use the srvctl setenv asm command with one of these syntax models:

srvctl setenv asm -envs "name=val[,name=val][...]"

srvctl setenv asm -env "name=val"

Table A-142 srvctl setenv asm Parameters

Parameter Description
-envs "name=val[,name=val][...]"

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

-env "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 -env "LANG=en"

srvctl setenv database

Administers cluster database environment configurations.

Syntax and Parameters

Use the srvctl setenv database command with one of these syntax models:

srvctl setenv database -db db_unique_name -envs "name=val[,name=val][...]"

srvctl setenv database -db db_unique_name -env "name=val"

Table A-143 srvctl setenv database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-envs "name=val,..."

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

-env "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 -db crm -env LANG=en

srvctl setenv listener

Administers listener environment configurations.

Syntax and Parameters

Use the srvctl setenv listener with one of these syntax models:

srvctl setenv listener [-listener listener_name] -envs "name=val[,name=val][...]"

srvctl setenv listener [-listener listener_name] -env "name=val"

Table A-144 srvctl setenv listener Parameters

Parameter Description
-listener listener_name

Name of the listener.

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

-envs "name=val"

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

-env "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 -env "LANG=en"

srvctl setenv mgmtdb

Administers the environment configuration for the management database (CHM repository).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl setenv mgmtdb command with one of these syntax models:

srvctl setenv mgmtdb -envs "name=val[,name=val][...]"

srvctl setenv mgmtdb -env "name=val"

Table A-145 srvctl setenv mgmtdb Parameters

Parameter Description
-envs "name=val,..."

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

-env "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 management database:

$ srvctl setenv mgmtdb -env LANG=en

srvctl setenv mgmtlsnr

Administers the environment configuration for the management listener resource (for CHM).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl setenv mgmtlsnr command with one of these syntax models:

srvctl setenv mgmtlsnr -envs "name=val[,name=val][...]"

srvctl setenv mgmtlsnr -env "name=val"

Table A-146 srvctl setenv mgmtlsnr Parameters

Parameter Description
-envs "name=val,..."

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

-env "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 management listener:

$ srvctl setenv mgmtlsnr -env 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 Parameters

Use the srvctl setenv nodeapps command with the following syntax model:

srvctl setenv nodeapps {-namevals "name=val[,name=val][...]" | 
    -nameval "name=val"} [-viponly] [-gsdonly] [-onsonly] [-verbose]

Table A-147 srvctl setenv nodeapps Parameters

Parameter Description
-envs "name=val[,name=val] [...]"

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

-env "name=val"

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

-viponly

Modify only the VIP configuration

-gsdonly

Modify only the GSD configuration

-onsonly

Modify only the ONS daemon configuration

-verbose

Verbose output


Example

To set an environment variable for all node applications:

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

srvctl setenv vip

Administers cluster VIP environment configurations.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl setenv vip command with the following syntax:

srvctl setenv vip -vip vip_name {-envs "name=val[,name=val,...]" | 
     -env "name=val"} [-verbose]

Table A-148 srvctl setenv vip Parameters

Parameter Description
-vip vip_name

Name of the VIP

-envs "name=val,..."

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

-env "name=val"

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

-verbose

Verbose output


Example

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

$ srvctl setenv vip -vip crm1-vip -env "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-149 srvctl start Summary

Command Description

srvctl start asm

Starts Oracle ASM instances

srvctl start cvu

Starts the Cluster Verification Utility

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 filesystem

Starts the Oracle ACFS volume resource

srvctl start gns

Starts GNS

srvctl start havip

Starts a specific HAVIP resource

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 mgmtdb

Starts the management database

srvctl start mgmtlsnr

Starts the management listener

srvctl start nodeapps

Starts the node applications

srvctl start oc4j

Starts the OC4J instance

srvctl start ons

Starts the Oracle Notification Service 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 volume

Starts an enabled volume


srvctl start asm

Starts an Oracle ASM instance.

Notes:

To manage Oracle ASM on Oracle Database 12c 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 Parameters

Use the srvctl start asm command with the following syntax:

srvctl start asm [-proxy] [-node node_name [-startoption start_options]]

Table A-150 srvctl start asm Parameters

Parameter Description
-proxy

Start a proxy Oracle ASM instance.

-node node_name

Node name

Note: This parameter can be used only with Oracle Clusterware.

-startoption start_options

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

Note: For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

See Also: SQL*Plus User's Guide and Reference for more information about startup options


Examples

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

$ srvctl start asm -node crmnode1

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

$ srvctl start asm

srvctl start cvu

Starts the CVU resource on one node in a cluster. If you specify a node name, then CVU starts on that node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start cvu command with the following syntax:

srvctl start cvu [-node node_name]

Specify a node on which you want to start the CVU resource.

Examples

An example of this command to start CVU on a single node of a cluster is:

$ srvctl start cvu -node crmnode1

srvctl start database

Starts a cluster database and its enabled instances and all listeners on nodes with database instances. You can disable listeners that should not be started.

Syntax and Parameters

Use the srvctl start database command with the following syntax:

srvctl start database -db db_unique_name [-eval] 
  [-startoption start_options] [-stopconcurrency number_of_instances] [-node node_name]  

Table A-151 srvctl start database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-startoption start_options

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

Notes:

  • This command parameter supports all database startup options.

  • For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

    See Also: SQL*Plus User's Guide and Reference for more information about startup options

[-startconcurrency number_of_instances]

Specify a number of database instances to start simultaneously, or specify 0 for an empty start concurrency value.

-node node_name

The name of the node on which you want to start the database

Notes:

  • This command only applies to Oracle RAC One Node databases.

  • The node you specify must be in the candidate list for an administrator-managed Oracle RAC One Node database or in the server pool for a policy-managed Oracle RAC One Node database.

  • If the database is already running on a node than the one you specify, then the command returns an error.

  • If you do not specify a node, then Oracle Clusterware chooses which node on which to start the Oracle RAC One Node database according to its policies, such as dispersion, number of resources, and order of candidate nodes.

  • If there is an active online database relocation for the Oracle RAC One Node database you are attempting to start, then both instances will already be running and the command returns an error message saying so (remember that only during an online database relocation are two instances of an Oracle RAC One Node database in existence).

    If the online database relocation failed for the Oracle RAC One Node database and you do not specify a node, then the command attempts to start both database instances.

    If the online database relocation failed for the Oracle RAC One Node database and you specify a node, then the command attempts to abort the failed relocation and start the instance on that node.


Example

An example of this command is:

$ srvctl start database -db crm -startoption 'read only'

srvctl start diskgroup

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

Syntax and Parameters

Use the srvctl start diskgroup command with the following syntax:

srvctl start diskgroup -diskgroup diskgrp_name [-node "node_list"]

Table A-152 srvctl start diskgroup Parameters

Parameter Description
-diskgroup diskgrp_name

The Oracle ASM disk group name

-node "node_list"

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

Note: This parameter can be used only with Oracle Clusterware.


Example

An example of this command is:

$ srvctl start diskgroup -diskgroup diskgroup1 -node "mynode1,mynode2"

srvctl start filesystem

Starts (mounts) the file system resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start filesystem command with the following syntax:

srvctl start filesystem -device volume_device [-node node_name]

Table A-153 srvctl start filesystem Parameters

Parameter Description
-device volume_device

The path of the file system resource device that you want to start.

-node node_name

The name of the node on which the file system resource should be started.

If you do not specify this parameter, then the utility starts the file system resource on all the available nodes in the cluster.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms, or as an Administrator user on Windows platforms, or as a configured file system user.

    See Also:

    srvctl add filesystem for more information about configuring file system users

Examples

To start a file system on all configured nodes in the cluster:

$ srvctl start filesystem -device /dev/asm/data_db1-68

To start the file system on node1:

$ srvctl start filesystem -device /dev/asm/data_db1-68 -node node1

srvctl start gns

Starts GNS on a specific node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start gns command with the following syntax:

srvctl start gns [-loglevel log_level] [-node node_name] [-verbose]

Table A-154 srvctl start gns Parameters

Parameter Description
-loglevel 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).

-node node_name

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

-verbose

Display verbose output


Usage Notes

You can only run this command in the server cluster. If you attempt to run this command in a client cluster, then an error occurs.

Example

An example of this command to start the GNS on the cluster node named crmnode1 is:

$ srvctl start gns -node crmnode1

srvctl start havip

Starts a specific highly available VIP (HAVIP) (used for highly available NFS exports) on a specific node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start havip command with the following syntax:

srvctl start havip -id havip_name [-node node_name]

Table A-155 srvctl start havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to start.

-node node_name

Optionally, you can use the -node parameter to specify the name of the node on which the HAVIP resource starts.


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

# srvctl start havip -id myhavip -node myNode1

srvctl start home

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

Syntax and Parameters

Use the srvctl start home command with the following syntax:

srvctl start home -oraclehome Oracle_home -statefile state_file -node node_name

Table A-156 srvctl start home Parameters

Parameter Description
-oraclehome Oracle_home

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

-statefile state_file

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

-node node_name

The name of the node where the Oracle home resides.

Note: This parameter can be used only with Oracle Clusterware.


Example

An example of this command is:

$ srvctl start home -oraclehome /u01/app/oracle/product/12.1.0/db_1
    -statefile ~/state.txt -node node1

srvctl start instance

Starts instances in the cluster database and all listeners on nodes with database instances. You can disable listeners that should not be started.

Notes:

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

  • If you run this command on an Oracle RAC One Node database, then the command returns an error instructing you to use the database noun, instead.

Syntax and Parameters

Use the srvctl start instance command with one of these syntax models:

srvctl start instance -db db_unique_name -node node_name 
   [-instance "instance_name"] [-startoption start_options]

srvctl start instance -db db_unique_name -instance "inst_name_list"
    [-startoption start_options]

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

Table A-157 srvctl start instance Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-node node_name

The name of a single node

Note: Use this parameter for policy-managed databases.

-instance { "instance_name" | "inst_name_list"

The name of a single instance or a comma-delimited list of instance names

Note: Use this parameter for policy-managed databases.

-startoption start_options

Options for startup command, such as OPEN, MOUNT, or NOMOUNT)

Note: For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

See Also: SQL*Plus User's Guide and Reference for more information about startup options


Example

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

$ srvctl start instance -db crm -node node2

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

$ srvctl start instance -db crm -instance "crm2,crm3"

srvctl start listener

Starts the default listener on the specified node_name, or starts the specified listener on all nodes that are registered with Oracle Clusterware or on the given node.

Syntax and Parameters

Use the srvctl start listener command with the following syntax:

srvctl start listener [-node node_name] [-listener listener_name]

Table A-158 srvctl start listener Parameters

Parameter Description
-node node_name

Specify a particular node name to start the listener on that node.

Note: This parameter can be used only with Oracle Clusterware.

-listener listener_name

Specify a particular listener name. Use the srvctl config listener command to obtain the name of a listener.

If you do not specify this parameter, then the listener name defaults to LISTENER for a database listener; LISTENER_ASM for an Oracle ASM listener; or LISTENER_LEAF for a Leaf Node listener.


Example

An example of this command is:

$ srvctl start listener -listener LISTENER_LEAF

srvctl start mgmtdb

Starts the management database (CHM repository) resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start mgmtdb command with the following syntax:

srvctl start mgmtdb [-startoption start_options] [-node node_name]

Table A-159 srvctl start mgmtdb Parameters

Parameter Description
-startoption start_options

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

Note: For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

See Also: SQL*Plus User's Guide and Reference for more information about startup options

-node node_name

Node name

Note: This parameter can be used only with Oracle Clusterware.


Examples

An example of this command to start the management database on the crmnode1 node of the cluster is:

$ srvctl start mgmtdb -node crmnode1

srvctl start mgmtlsnr

Starts the management listener resource (for CHM).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start mgmtlsnr command with the following syntax:

srvctl start mgmtlsnr [-node node_name]

Specify the node on which you want to start the management listener.

Examples

For example, to start the management listener on the crmnode1 node:

$ srvctl start mgmtlsnr -node crmnode1

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 Parameters

Use the srvctl start nodeapps command with the following syntax:

srvctl start nodeapps [-node node_name] [-gsdonly] [-adminhelper] [-verbose]

Table A-160 srvctl start nodeapps Parameters

Parameter Description
-node node_name

Node name

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

-gsdonly

Starts only GSD instead of all node applications

-adminhelper

Starts only an Administrator helper instead of all node applications

-verbose

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 Parameters

Use the srvctl start oc4j command with the following syntax:

srvctl start oc4j [-node node_name] [-verbose]

You can specify a particular node on which to start the OC4J instance. Specify -verbose to indicate that verbose output should be displayed.

srvctl start ons

Starts the Oracle Notification Service daemon.

Note:

This command is only available with Oracle Restart.

Syntax and Parameters

Use the srvctl start ons command with the following syntax:

srvctl start ons [-verbose]

There is only one parameter for this command, -verbose, 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 Parameters

Use the srvctl start scan command with the following syntax:

srvctl start scan [-scannumber ordinal_number] [-node node_name]

Table A-161 srvctl start scan Parameters

Parameter Description
-scannumber ordinal_number

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

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

-node node_name

The name of a single node.

If you do not specify this parameter, 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 crm1 node, use the following command:

$ srvctl start scan -scannumber 1 -node crm1

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 Parameters

Use the srvctl start scan_listener command with the following syntax:

srvctl start scan_listener [-node node_name] [-scannumber ordinal_number]

Table A-162 srvctl start scan_listener Parameters

Parameter Description
-scannumber ordinal_number

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

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

-node node_name

The name of a single node.

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


Example

An example of this command is:

$ srvctl start scan_listener -scannumber 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 Parameters

Use the srvctl start service command with the following syntax:

srvctl start service -db db_unique_name [-eval] [-service "services_list" 
  [-node node_name | -instance instance_name | -serverpool pool_name |  
   -global_override] [-startoption start_options] [-verbose]

Table A-163 srvctl start service Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-service "services_list"

Comma-delimited list of service names.

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

-node node_name

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

Note: This parameter can be used only with Oracle Clusterware.

-instance instance_name

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

Note: This parameter can be used only with Oracle Clusterware.

-serverpool pool_name

The name of the server pool in which to start the service. Use this parameter for policy-managed databases.

-global_override

Override value to operate on a global service. Use this parameter only with global services; this parameter is ignored if specified for a non-global service.

-startoption start_options

Startup options used when service startup requires starting a database instance. Options include OPEN, MOUNT, and NOMOUNT.

Note: For multi-word startup options, such as read only and read write, separate the words with a space and enclose in single quotation marks (''). For example, 'read only'.

See Also: SQL*Plus User's Guide and Reference for more information about startup options

-verbose

Display verbose output.


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 -db crm -service crm

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

$ srvctl start service -db crm -service crm -instance 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 Parameters

Use the srvctl start vip command with the following syntax:

srvctl start vip {-node node_name | -vip vip_name } [-verbose]

Table A-164 srvctl start vip Parameters

Parameter Description
-node node_name

Node name

-vip vip_name

The VIP name

-verbose

Verbose start


Example

An example of this command is:

$ srvctl start vip -vip crm1-vip -verbose

srvctl start volume

Starts a specific, enabled volume.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start volume command with the following syntax:

srvctl start volume {-volume volume_name -diskgroup disk_group_name |
    -device volume_device} [-node node_list]

Table A-165 srvctl start volume Parameters

Parameter Description
-volume volume_name

Specify the name of the volume that you want to start. This parameter is required.

-diskgroup disk_group_name

Specify the name of the disk group in which the volume that you want to start resides.

-device volume_device

Specify the path to the volume device that you want to start.

-node node_list

Specify a comma-delimited list of node names where volumes that you want to start reside.


Usage Notes

The srvctl start volume command does not create a volume service. Provided that the volume already exists and the volume resource is enabled, SRVCTL attempts to start it. If the volume exists but the resource is disabled, then srvctl start volume returns an error.

Example

The following example starts a volume named VOLUME1 that resides in a disk group named DATA:

$ srvctl start volume -volume VOLUME1 -diskgroup DATA

status

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

If you use the -verbose parameter with the status command, then SRVCTL displays the INTERNAL_STATE, which indicates actions in progress by Oracle Clusterware, such as starting, stopping, or cleaning. If the internal state is STABLE, then the -verbose parameter displays nothing because this is the normal state. Additionally, the -verbose parameter displays STATE_DETAILS, which may indicate additional information provided by the resource about why it is in its current state

Table A-166 srvctl status Summary

Command Description

srvctl status asm

Displays the status of Oracle ASM instances

srvctl status cvu

Displays the status of the Cluster Verification Utility

srvctl status database

Displays the status of a database

srvctl status diskgroup

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

srvctl status filesystem

Displays the status of an Oracle ACFS volume

srvctl status gns

Displays the status of GNS

srvctl status havip

Displays the status of highly available VIPs

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 mgmtdb

Displays the status of the management database

srvctl status mgmtlsnr

Displays the status of the management listener

srvctl status nodeapps

Displays the status of node applications

srvctl status oc4j

Determines which node is running the Oracle Database QoS Management server

srvctl status ons

Displays the status of Oracle Notification Service

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 volume

Displays the status of volumes


srvctl status asm

Displays the status of an Oracle ASM instance.

Note:

To manage Oracle ASM on Oracle Database 12c 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 Parameters

Use the srvctl status asm command with the following syntax:

srvctl status asm [-proxy] [-node node_name] [-detail] [-verbose]

Table A-167 srvctl status asm Parameters

Parameter Description
-proxy

Display the status for an Oracle ASM proxy instance.

-node node_name

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

Note: This parameter can be used only with Oracle Clusterware.

-detail

Print detailed status information.

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status asm -node crmnode1 -detail

srvctl status cvu

Displays the current state of the CVU resource on one node in a cluster. If you specify a node name, then the command checks CVU status on that node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status cvu command with the following syntax:

srvctl status cvu [-node node_name]

You can optionally specify the node where the CVU resource is running, if it is not the local node.

Example

An example of this command to check the status of CVU on the node in the cluster named crmnode1 is:

$ srvctl status cvu -node crmnode1

srvctl status database

Displays the status of instances and their services, and where the instances are running.

If you run this command on an Oracle RAC One Node database, then the output shows the status of any online database relocation (active, failed, or inactive), and the source and destination nodes of the relocation.

Syntax and Parameters

Use the srvctl status database command with the following syntax:

srvctl status database -db db_unique_name [-force] [-verbose]

Table A-168 srvctl status database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-force

Include disabled applications

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status database -db crm -verbose

srvctl status diskgroup

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

Syntax and Parameters

Use the srvctl status diskgroup command with the following syntax:

srvctl status diskgroup -diskgroup diskgroup_name [-node "node_list"] 
     [-detail] [-verbose]

Table A-169 srvctl status diskgroup Parameters

Parameter Description
-diskgroup diskgroup_name

The Oracle ASM disk group name

-node node_list

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

Note: This parameter can be used only with Oracle Clusterware.

-detail

Display detailed status information for the disk group

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status diskgroup -diskgroup dgrp1 -node "mynode1,mynode2" -detail

srvctl status filesystem

Displays the status of the file system resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status filesystem command with the following syntax:

srvctl status filesystem [-device volume_device] [-verbose]

Table A-170 srvctl status filesystem Parameters

Parameter Description
-device volume_device

The path of the file system resource for which you want to obtain the status. If you do not specify this parameter, then SRVCTL displays the status of all file systems.

-verbose

Displays verbose output.


Examples

This command displays output similar to the following, depending on whether you specify a device name:

If you specify a device name:

$ srvctl status filesystem -device /dev/asm/racvol_1
ACFS file system is not mounted on node1
ACFS file system is not mounted on node2

If you do not specify a device name:

$ srvctl status filesystem
ACFS file system is not running 
ACFS file system is running on node1,node3

Note:

In the preceding examples, the file system is Oracle ACFS. If you are using other file systems, then they will display as EXT3 or EXT4.

srvctl status gns

Displays the current state of GNS.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status gns command with the following syntax:

srvctl status gns [-node node_name] [-verbose]

Table A-171 srvctl status gns Parameters

Parameter Description
-node node_name

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

-verbose

Displays verbose output.


srvctl status havip

Displays the status of all highly available VIPs (HAVIPs) (used for highly available NFS exports) in a cluster or one particular highly available VIP.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status havip command with the following syntax:

srvctl status havip [-id havip_name]

Table A-172 srvctl status havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource you want to display. If you do not specify this parameter, then SRVCTL displays the status of all HAVIPs known to Oracle Clusterware.


Example

This command returns output similar to the following:

$ srvctl status havip

HAVIP ora.ha1.havip is enabled
HAVIP ora.ha1.havip is not running

srvctl status home

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

Syntax and Parameters

Use the srvctl status home command with the following syntax:

srvctl status home -oraclehome Oracle_home -statefile state_file -node node_name

Table A-173 srvctl status home Parameters

Parameter Description
-oraclehome Oracle_home

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

-statefile state_file

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

-node node_name

The name of the node where the Oracle home resides.

Note: This parameter is required and can be used only with Oracle Clusterware.


Example

An example of this command is:

$ srvctl status home -oraclehome /u01/app/oracle/product/12.1/dbhome_1 -statefile
 ~/state.txt -node stvm12

The preceding command returns output similar to the following:

Database cdb1 is running on node stvm12

srvctl status instance

Displays the status of instances.

Note:

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

Syntax and Parameters

Use the srvctl status instance command with the following syntax:

srvctl status instance -db db_unique_name {-node node_name 
     | -instance "instance_name_list"} [-force] [-verbose]

Table A-174 srvctl status instance Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-node node_name

Node name

Note: Use this parameter for policy-managed databases

-instance "inst_name_list"

Comma-delimited list of instance names

Note: Use this parameter for administrator-managed databases

-force

Include disabled applications

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status instance -db crm -instance "crm1,crm2" -verbose

srvctl status listener

Displays the status of listener resources.

Syntax and Parameters

Use the srvctl status listener command with the following syntax:

srvctl status listener [-listener listener_name] [-node node_name] [-verbose]

Table A-175 srvctl status listener Parameters

Parameter Description
-listener listener_name

Name of a listener.

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

-node node_name

Name of a cluster node.

Note: This parameter can be used only for Oracle Clusterware.

-verbose

Displays verbose output.


Example

To display the status of the default listener on the node node2, use the following command:

$ srvctl status listener -node node2

srvctl status mgmtdb

Displays the current state of the management database (CHM repository) resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status mgmtdb command with the following syntax:

srvctl status mgmtdb [-verbose]

You can optionally specify that verbose output should be displayed.

Examples

An example of this command to check the status of the management database is:

$ srvctl status mgmtdb

srvctl status mgmtlsnr

Displays the status of the management listener resource (for CHM).

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status mgmtlsnr command with the following syntax:

srvctl status mgmtlsnr [-node node_name] [-verbose]

Table A-176 srvctl status mgmtlsnr Parameters

Parameter Description
-node node_name

Name of a cluster node.

Note: This parameter can be used only for Oracle Clusterware.

-verbose

Displays verbose output.


Example

To display the status of the management listener on the node node2, use the following command:

$ srvctl status mgmtlsnr -node node2

srvctl status nodeapps

Displays the status of node applications.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status nodeapps command with the following syntax:

srvctl status nodeapps [-node node_name]

You can optionally specify the node for which to display the status of the node applications.

srvctl status oc4j

Determines which node is running the Oracle Database QoS Management server.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status oc4j command with the following syntax:

srvctl status oc4j [-node node_name] [-verbose]

Table A-177 srvctl status oc4j Parameters

Parameter Description
-node node_name

Specify a node on which the OC4J instance (used by Oracle Database QoS Management server) is running

-verbose

Displays verbose output.


srvctl status ons

Displays the current state of the Oracle Notification Service daemon.

Note:

This command is only available with Oracle Restart.

Syntax and Parameters

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 Parameters

Use the srvctl status scan command with the following syntax:

srvctl status scan [-scannumber ordinal_number] [-verbose]

Table A-178 srvctl status scan Parameters

Parameter Description
-scannumber ordinal_number

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

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status scan -scannumber 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 Parameters

Use the srvctl status scan_listener command with the following syntax:

srvctl status scan_listener [-scannumber ordinal_number] [-verbose]

Table A-179 srvctl status scan_listener Parameters

Parameter Description
-scannumber ordinal_number

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

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status scan_listener -scannumber 1

srvctl status server

Displays the current state of named servers.

Syntax and Parameters

Use the srvctl status server command with the following syntax:

srvctl status server -server "server_name_list" [-detail]

Table A-180 srvctl status server Parameters

Parameter Description
-server "server_name_list"

Comma-delimited list of server names.

-detail

Print detailed status information.


Example

The following example displays the status of a named server:

$ srvctl status server -server "server11" -detail

srvctl status service

Displays the status of a service.

For Oracle RAC One Node databases, if there is an online database relocation in process, then the srvctl status service command displays the source and destination nodes and the status of the relocation, whether it is active or failed.

Syntax and Parameters

Use the srvctl status service command with the following syntax:

srvctl status service -db db_unique_name [-service "service_name_list"]
      [-force] [-verbose]

Table A-181 srvctl status service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-services "service_name_list"

Comma-delimited list of service names.

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

-force

Include disabled applications

-verbose

Displays verbose output.


Example

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

$ srvctl status service -db crm -service "crm" -verbose

srvctl status srvpool

Displays server pool names, number of servers in server pools, and, optionally, the names of the servers in the server pools.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status srvpool command with the following syntax:

srvctl status srvpool [-serverpool pool_name] [-detail]

Table A-182 srvctl status srvpool Parameters

Parameter Description
-serverpool pool_name

Name of the server pool

-detail

Print detailed status information


Usage Notes

  • If you include the -detail parameter but do not specify a specific server pool with the -serverpool parameter, then the output of this command includes the names of servers that are currently assigned to each server pool.

  • If you use the -serverpool parameter to specify a server pool, then the output for this command includes the server pool name and number of servers in the server pool (and, optionally, the server names) for the specified server pool.

Example

An example of this command is:

$ srvctl status srvpool -serverpool srvpool1 -detail

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 Parameters

Use the srvctl status vip command with the following syntax:

srvctl status vip {-node node_name | -vip vip_name} [-verbose]

Table A-183 srvctl status vip Parameters

Parameter Description
-node node_name

Node name

-vip vip_name

The VIP name

-verbose

Displays verbose output.


Example

An example of this command is:

$ srvctl status vip -vip node1-vip

srvctl status volume

Displays the status of a specific volume or all volumes.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl status volume command with the following syntax:

srvctl status volume [-device volume_device] [-volume volume_name] 
   [-diskgroup disk_group_name] [-node "node_list"]

Table A-184 srvctl status volume Parameters

Parameter Description
-device volume_device

Specify the path to the volume device for which you want to display the status.

-volume volume_name

Specify the name of the volume for which you want to view the status.

-diskgroup disk_group_name

Specify the name of the disk group in which the volume resides for which you want to display the status.

-node "node_list"

Specify a comma-delimited list of node names where volumes for which you want to view the status reside.


Usage Notes

  • If you do not specify any of the optional parameters, then SRVCTL displays the status for all volumes.

  • If you specify only the -volume parameter, then SRVCTL displays the status for the volume that you specify.

  • If you specify only the -diskgroup parameter, then SRVCTL displays the status for the volumes that reside in the disk group that you specify.

  • If you specify only the -device parameter, then SRVCTL displays the status for the volume device that you specify.

  • If you specify the -diskgroup and -device parameters, then SRVCTL displays the status for the volume device in the disk group that you specify.

  • If you specify the -node parameter, then SRVCTL displays the status of the volumes that reside on the nodes you list.

Examples

The srvctl status volume command displays information similar to the following:

$ srvctl status volume –volume vol1
Volume vol1 of diskgroup diskgrp1 for device volume_device_path1 is enabled
Volume vol1 of diskgroup diskgrp1 for device volume_device_path1 is running

In the preceding example, SRVCTL performs a status query on all nodes because the -node parameter is not specified.

$ srvctl status volume
Volume vol1 of diskgroup diskgrp for device volume_device_path1 is enabled
Volume vol1 of diskgroup diskgrp for device volume_device_path1 is running
Volume vol2 of diskgroup diskgrp for device volume_device_path2 is enabled
Volume vol2 of diskgroup diskgrp for device volume_device_path2 is running

In the preceding example, SRVCTL displays the status of all registered volumes because the no parameter is specified.

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 enabled, starting or running are stopped. Objects running outside of Oracle Clusterware are not stopped.

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

Notes:

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

  • When you use the -force parameter to stop dependent applications and the object, then those dependent applications do not restart when the object is later restarted or after the node fails. You must restart the dependent applications, manually, except for services with AUTOMATIC management policy when a database is stopped.

Table A-185 srvctl stop Summary

Command Description

srvctl stop asm

Stops Oracle ASM instances

srvctl stop cvu

Stops the Cluster Verification Utility resource

srvctl stop database

Stops the cluster database

srvctl stop diskgroup

Stops a specific disk group on a specified number of nodes

srvctl stop filesystem

Stops the Oracle ACFS volume resource

srvctl stop gns

Stops GNS

srvctl stop havip

Stops a specific highly available VIP (used for highly available NFS exports)

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 mgmtdb

Stops the management database

srvctl stop mgmtlsnr

Stops the management listener

srvctl stop nodeapps

Stops the node-level applications

srvctl stop oc4j

Stops the OC4J instance

srvctl stop ons

Stops Oracle Notification Service

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 volume

Stops a volume device


srvctl stop asm

Stops an Oracle ASM instance.

Syntax and Parameters

Use the srvctl stop asm command with the following syntax:

srvctl stop asm [-proxy] [-node node_name] 
   [-stopoption stop_options] [-force]

Notes:

  • To manage Oracle ASM on Oracle Database 12c 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.

Table A-186 srvctl stop asm Parameters

Parameter Description
-proxy

Stop an Oracle ASM proxy instance.

-node node_name

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

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

Note: This parameter can be used only with Oracle Clusterware.

-stopoption stop_options

Options for shutdown command, such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-force

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


Example

An example of this command is:

$ srvctl stop asm -node crmnode1 -stopoption IMMEDIATE

srvctl stop cvu

Stops the Cluster Verification Utility (CVU) that is either in the running or starting state.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop cvu command with the following syntax:

srvctl stop cvu [-force]

The -force parameter is the only parameter you can use with this command. The -force parameter forces CVU to stop.

Examples

An example of this command to stop CVU:

$ srvctl stop cvu

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 Parameters

Use the srvctl stop database command with the following syntax:

srvctl stop database -db db_unique_name [-stopoption stop_options] 
  [[-stopconcurrency number_of_instances] [-eval] [-force] [-verbose]

Table A-187 srvctl stop database Parameters

Parameter Description
-db db_unique_name

Unique name for the database.

-stopoption stop_options

Use this parameter to specify shutdown command options, such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

[-stopconcurrency number_of_instances]

Specify a number of database instances to stop simultaneously, or specify 0 for an empty stop concurrency value.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-force

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

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl stop database -db crm -stopoption NORMAL

srvctl stop diskgroup

Use this command to stop a specific disk group resource on a number of specified nodes.

Syntax and Parameters

Use the srvctl stop diskgroup command with the following syntax:

srvctl stop diskgroup -diskgroup diskgroup_name [-node "node_list"] [-force]

Table A-188 srvctl stop diskgroup Parameters

Parameter Description
-diskgroup diskgroup_name

The Oracle ASM disk group name

-node "node_list"

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

Note: This parameter can be used only with Oracle Clusterware.

-force

This parameter 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 -diskgroup diskgroup1 -node "mynode1,mynode2" -force

srvctl stop filesystem

Use this command to stop (unmount) the Oracle ACFS file system or generic file system.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop filesystem command with the following syntax:

srvctl stop filesystem -device volume_device [-node node_name] [-force]

Table A-189 srvctl stop filesystem Parameters

Parameter Description
-device volume_device

Specify the path to the file system volume device to stop.

-node node_name

The name of a node.

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

-force

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


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms, or as an Administrator user on Windows platforms, or as a configured file system user.

    See Also:

    srvctl add filesystem for more information about configuring file system users

Example

An example of this command is:

$ srvctl stop filesystem -device /dev/asm/racvol_1 -force

srvctl stop gns

Use this command to stop GNS in the cluster.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop gns command with the following syntax:

srvctl stop gns [-node node_name] [-verbose] [-force]

Table A-190 srvctl stop gns Parameters

Parameter Description
-node node_name

The name of a node on which GNS is running

-verbose

Verbose output

-force

Force stop


Example

An example of this command to stop GNS on the local node is:

$ srvctl stop gns

srvctl stop havip

Stops the highly available VIPs (HAVIPs) (used for highly available NFS exports) on a specific node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop havip command with the following syntax:

srvctl stop havip -id havip_name [-node node_name] [-force]

Table A-191 srvctl stop havip Parameters

Parameter Description
-id havip_name

Specify the unique name of the HAVIP resource to stop.

-node node_name

Optionally, you can specify the name of the node on which the HAVIP resource to stop resides.

-force

Force stop


Usage Notes

  • You must run this command as root user on Linux and UNIX platforms.

Example

An example of this command is:

# srvctl stop havip -id myhavip -node myNode1

srvctl stop home

Stops all the Oracle Restart-managed or Oracle Clusterware-managed resources that run from the specified Oracle home.

Syntax and Parameters

Use the srvctl stop home command with the following syntax:

srvctl stop home -oraclehome Oracle_home -statefile state_file -node node_name
       [-stopoption stop_options] [-force]

Table A-192 srvctl stop home Parameters

Parameter Description
-oraclehome Oracle_home

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

Note: The path to the Oracle home you specify must be the same version as the Oracle home from which you invoke SRVCTL.

-statefile state_file

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

-node node_name

The name of the node where the Oracle home resides.

Note: This parameter can be used only with Oracle Clusterware.

-stopoption stop_options

Shutdown options for the database, such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-force

Stop the resources even if errors are reported.


Example

An example of this command is:

$ srvctl stop home -oraclehome /u01/app/oracle/product/12.1.0/db_1 -statefile
 ~/state.txt

srvctl stop instance

Stops instances and stops any services running on specified instances, unless you specify the -force parameter. If you specify -force, then the services fail over to an available instance when the instance stops.

Notes:

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

  • If you run this command on an Oracle RAC One Node database, then the command returns an error instructing you to use the database noun, instead.

Syntax and Parameters

Use the srvctl stop instance command with the following syntax:

srvctl stop instance -db db_unique_name {-node node_name 
    | -instance "instance_name_list"} [-stopoption stop_options] [-force]

You must enclose the list of comma-delimited instance names in double quotation marks ("").

Table A-193 srvctl stop instance Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-node node_name

The name of a single node

Note: Use this parameter for policy-managed databases.

-instance "inst_name_list"

Comma-delimited list of instance names enclosed in double quotation marks

Note: Use this parameter for administrator-managed databases.

-stopoption stop_options

Options for shutdown command, such as NORMAL, TRANSACTIONAL LOCAL, IMMEDIATE, or ABORT

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-force

This parameter fails the running services over to another instance.


Example

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

$ srvctl stop instance -db crm -node node1

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

$ srvctl stop instance -db crm -instance "crm1"

srvctl stop listener

Stops the default listener or a specific listener on all nodes or the specified node.

This command can also be used to stop a listener on a noncluster database from the noncluster database home. However, SRVCTL does not accept the -node parameter when run from a noncluster database home.

Syntax and Parameters

Use the srvctl stop listener command with the following syntax:

srvctl stop listener [-listener listener_name] [-node node_name] [-force]

Table A-194 srvctl stop listener Parameters

Parameter Description
-listener listener_name

The name of the listener to stop.

If you do not specify this parameter, then the listener name defaults to LISTENER for a database listener; LISTENER_ASM for an Oracle ASM listener; or LISTENER_LEAF for a Leaf Node listener.

-node node_name

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

Note: This parameter can be used only with Oracle Clusterware.

-force

Force stop


Example

The following command stops the default listener LISTENER on the node mynode1:

$ srvctl stop listener -node mynode1

srvctl stop mgmtdb

Stops the management database (CHM repository) resource.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop mgmtdb command with the following syntax:

srvctl stop mgmtdb [-stopoption stop_options] [-force]

Table A-195 srvctl stop mgmtdb Parameters

Parameter Description
-stopoption stop_options

Use this parameter to specify shutdown command options, such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-force

Stops the database and any associated services and any dependent resources


Example

An example of this command is:

$ srvctl stop mgmtdb -stopoption NORMAL

srvctl stop mgmtlsnr

Stops the management listener resource (for CHM) on all nodes or the specified node.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop mgmtlsnr command with the following syntax:

srvctl stop mgmtlsnr [-node node_name] [-force]

Table A-196 srvctl stop mgmtlsnr Parameters

Parameter Description
-node node_name

The name of a single node on which the management listener runs.

-force

Force stop


Example

The following command stops the management listener on the node mynode1:

$ srvctl stop mgmtlsnr -node 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 Parameters

Use the srvctl stop nodeapps command with the following syntax:

srvctl stop nodeapps [-node node_name] [-gsdonly] [-adminhelper] [-force]
   [-relocate] [-verbose]

Table A-197 srvctl stop nodeapps Parameters

Parameter Description
-node node_name

Node name

If you do not specify this parameter, then the utility stops the node applications (nodeapps) on all active nodes in the cluster.

-gsdonly

Stops only the GSD instead of all nodeapps

-adminhelper

Stops only the Administrator helper instead of all nodeapps

-relocate

Relocate VIP and possibly dependent services

Note: If you specify this parameter, then you must also specify the -node node_name parameter.

-force

Force stop

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl stop nodeapps

srvctl stop oc4j

Stops the OC4J instance that is in the running or starting state.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop oc4j command with the following syntax:

srvctl stop oc4j [-force] [-verbose]

Table A-198 srvctl stop oc4j Parameters

Parameter Description
-force

Force stop of the SCAN Listener.

-verbose

Display verbose output


Example

An example of this command is:

$ srvctl stop oc4j -force -verbose

srvctl stop ons

Stops the Oracle Notification Service daemon.

Note:

This command is only available with Oracle Restart.

Syntax and Parameters

Use the srvctl stop ons command with the following syntax:

srvctl stop ons [-verbose]

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

Example

An example of this command is:

$ srvctl stop ons -verbose

srvctl stop scan

Stops all SCAN VIPs, by default, that are running or in starting state, or stops a specific SCAN VIP identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop scan command with the following syntax:

srvctl stop scan [-scannumber ordinal_number] [-force]

Table A-199 srvctl stop scan Parameters

Parameter Description
-scannumber ordinal_number

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

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

-force 

Force stop of the SCAN VIP.


Example

An example of this command is:

$ srvctl stop scan -scannumber 1

srvctl stop scan_listener

Stops all SCAN listeners, by default, that are in a running or starting state, or a specific listener identified by ordinal_number.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl start scan_listener command with the following syntax:

srvctl stop scan_listener [-scannumber ordinal_number] [-force]

Table A-200 srvctl stop scan_listener Parameters

Parameter Description
-scannumber ordinal_number

An ordinal number that identifies which SCAN listener to stop. You can specify values of 1, 2, or 3 for this parameter.

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

-force

Force stop of the SCAN listener.


Example

An example of this command is:

$ srvctl stop scan_listener -scannumber 1

srvctl stop service

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

Syntax and Parameters

Use the srvctl stop service command with the following syntax:

srvctl stop service -db db_unique_name [-service "services_list" 
  [-node node_name | -instance instance_name | -serverpool pool_name |
   -global_override]] [-eval] [-force]

You must enclose the list of comma-delimited service names in double quotation marks ("").

Table A-201 srvctl stop service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service "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.

-node node_name

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

Note: This parameter can be used only with Oracle Clusterware.

-instance instance_name

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

Note: This parameter can be used only with Oracle Clusterware.

-serverpool pool_name

The name of the server pool that contains the service

-global_override

Override value to operate on a global service. This parameter is ignored if the service is not a global service.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-force

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 -force parameter, 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 for all cluster database instances:

$ srvctl stop service -db crm -service "crm"

The following example stops a service on a specified instance:

$ srvctl stop service -db crm -service "crm" -instance 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 Parameters

Use the srvctl stop vip command with the following syntax:

srvctl stop vip {-node node_name | -vip vip_name} [-force] [-relocate] [-verbose]

Table A-202 srvctl stop vip Parameters

Parameter Description
-node node_name

This parameter stops all VIPs on a specific node, including failed-over VIPs

-vip vip_name

This parameter stops a specific VIP

-force

Force SRVCTL to stop the VIP

-relocate

Relocate VIP

Note: You must use the -node node_name parameter with the -relocate parameter.

-verbose

Verbose output


Example

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

$ srvctl stop vip -node mynode1 -verbose

srvctl stop volume

Stops a specific, running volume.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl stop volume command with the following syntax:

srvctl stop volume {-volume volume_name -diskgroup disk_group_name |
    -device volume_device} [-node "node_list"]

Table A-203 srvctl stop volume Parameters

Parameter Description
-volume volume_name

Specify the name of the volume to stop.

-diskgroup disk_grp_name

Specify the name of the disk group in which the volume to stop resides.

-device volume_device

Specify the path to the volume device to stop.

-node "node_list"

Specify a comma-delimited list of node names where volumes to stop reside.


Usage Notes

The srvctl stop volume command attempts to stop (disable) the volume but it does not disable the resource or remove the volume from Oracle ASM.

Example

The following example stops a volume named VOLUME1 that resides in a disk group named DATA:

$ srvctl stop volume -volume VOLUME1 -diskgroup DATA

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-204 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 mgmtdb

Unsets the value for the management database.

srvctl unsetenv mgmtlsnr

Unsets the value for the management listener.

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 Parameters

Use the srvctl unsetenv asm command as follows:

srvctl unsetenv asm -envs "name_list"

Use the -envs parameter to specify a 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 -envs "CLASSPATH"

srvctl unsetenv database

Unsets the cluster database environment configurations.

Syntax and Parameters

Use the srvctl unsetenv database command as follows:

srvctl unsetenv database -db db_unique_name -envs "name_list"

Table A-205 srvctl unsetenv database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-envs "name_list"

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


Example

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

$ srvctl unsetenv database -db crm -envs "CLASSPATH,LANG"

srvctl unsetenv listener

Unsets the environment configuration for a listener.

Syntax and Parameters

Use the srvctl unsetenv listener command as follows:

srvctl unsetenv listener [-listener listener_name] -envs "name_list"

Table A-206 srvctl unsetenv listener Parameters

Parameter Description
-listener listener_name

Name of the listener.

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

-envs "name_list"

A comma-delimited list of names of environment variables


Example

The following example unsets the environment variable TNS_ADMIN for the default listener:

$ srvctl unsetenv listener -envs "TNS_ADMIN"

srvctl unsetenv mgmtdb

Unsets the management database (CHM repository) environment configurations.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl unsetenv mgmtdb command as follows:

srvctl unsetenv mgmtdb -envs "name_list"

Use the -envs parameter to specify a comma-delimited list of the names of environment variables enclosed in double quotation marks ("").

Example

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

$ srvctl unsetenv mgmtdb -envs "LANG"

srvctl unsetenv mgmtlsnr

Unsets the management listener resource (for CHM) environment configurations.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl unsetenv mgmtlsnr command as follows:

srvctl unsetenv mgmtlsnr -envs "name_list"

Use the -envs parameter to specify a comma-delimited list of the names of environment variables enclosed in double quotation marks ("").

Example

The following example unsets the environment configuration for a management listener environment variable:

$ srvctl unsetenv mgmtlsnr -envs "LANG"

srvctl unsetenv nodeapps

Unsets the environment configuration for the node applications.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl unsetenv nodeapps command as follows:

srvctl unsetenv nodeapps -envs "name_list" [-viponly] [-gsdonly]
   [-onsonly] [-verbose]

Table A-207 srvctl unsetenv nodeapps Parameters

Parameter Description
-envs "name_list"

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

-viponly

Modify only the VIP configuration instead of all nodeapps

-gsdonly

Modify only the GSD configuration instead of all nodeapps

-onsonly

Modify only the ONS daemon configuration instead of all nodeapps

-verbose

Display verbose output


Example

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

$ srvctl unsetenv nodeapps -envs "test_var1,test_var2"

srvctl unsetenv vip

Unsets the environment configuration for the specified cluster VIP.

Syntax and Parameters

Use the srvctl unsetenv vip command as follows:

srvctl unsetenv vip -vip "vip_name_list" -envs "name_list" [-verbose]

Table A-208 srvctl unsetenv vip Parameters

Parameter Description
-vip "vip_name_list"

Comma-delimited list of VIP names enclosed in double-quotes ("")

-envs "name_list"

Comma-delimited list of environment variable names enclosed in double-quotes ("")

-verbose

Display verbose output


Example

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

$ srvctl unsetenv vip -vip "crm2-vip" -envs "CLASSPATH"

update

The srvctl update command requests that the specified running object use the new configuration information stored in the OCR.

Table A-209 srvctl update Command Summary

Command Description

srvctl update database

Updates the specified database to use the new listener endpoints

srvctl update gns

Updates the configuration for GNS

srvctl update listener

Updates the listener to listen on the new endpoints

srvctl update scan_listener

Update the SCAN listeners to listen on the new endpoints.


srvctl update database

Updates the specified database to use the new listener endpoints.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl update database command with the following syntax:

srvctl update database -db db_unique_name

Use the -db parameter to specify the unique name of the database to update.

srvctl update gns

Use the srvctl update gns command to modify a Grid Naming Service (GNS) instance.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl update gns command with one of these syntax models:

srvctl update gns -advertise name -address ip_address [-timetolive time_to_live]
  [-verbose]

srvctl update gns -delete name [-address address] [-verbose]

srvctl update gns -alias alias -name name [-timetolive time_to_live] [-verbose]

srvctl update gns -deletealias alias [-verbose]

srvctl update gns -createsrv service -target target -protocol protocol 
  [-weight weight] [-priority priority] [-port port_number] 
  [-timetolive time_to_live] [-instance instance_name] [-verbose]

srvctl update gns -deletesrv service_name -target target -protocol protocol
   [-verbose]

srvctl update gns -createtxt name -target target [-timetolive time_to_live]
   [-namettl name_ttl] [-verbose]

srvctl update gns -deletetxt name -target target [-verbose]

srvctl update gns -createptr name -target target [-timetolive time_to_live]
   [-namettl name_ttl] [-verbose]

srvctl update gns -deleteptr name -target target [-verbose]

Table A-210 srvctl update gns Parameters

Parameter Description
-advertise name

Advertise a name through GNS

-address ip_address

The IP address for an advertised name

-timetolive time_to_live

Optionally, you can specify, in seconds, an amount of time for the record to live

-delete name

Remove the advertisement of a name from GNS

-alias alias

Create an alias for an advertised name

-name name

The advertised name associated with the alias

-deletalias alias

Delete an alias

-createsrv service

Create a service that is described by the record

-target target

Specify a name that is associated with the service

-protocol protocol

Specify which protocol is used to connect to the service

-weight weight

Specify the weight of the record

-priority priority

Specify the priority of the record, with a value ranging from 0 to 65535

-port port_number

Specify the port number used to connect to the service, with a value ranging from 0 to 65535

-instance instance_name

Instance name of service

-deletesrv service

Name of the service record to be deleted

-createtxt name

Add a text (TXT) record using the specified name

-namettl name_ttl

Time to live for the name, specified in seconds

-deletetxt name

Delete a text (TXT) record of the specified name

-createptr name

Add a pointer (PTR) record for the specified name

-deleteptr name

Delete a pointer (PTR) record for the specified name


Usage Notes

You must be logged in as the root user on Linux and UNIX platforms, or as an Administrator user on Windows platforms, to run this command.

Example

The following command advertises a name with GNS:

# srvctl update gns -advertise myname -address 192.168.1.45

srvctl update listener

Updates the listener to listen on the new endpoints.

Note:

This command is only available with Oracle Clusterware.

Use the srvctl update listener command with the following syntax:

srvctl update listener

This command does not accept any additional parameters, except for -help.

srvctl update scan_listener

Updates the SCAN listeners to listen on the new endpoints.

Note:

This command is only available with Oracle Clusterware.

Use the srvctl update scan_listener command with the following syntax:

srvctl update scan_listener

This command does not accept any additional parameters, except for -help.

srvctl upgrade database

The srvctl upgrade database command upgrades the configuration of a database and all of its services to the version of the database home from where this command is run.

Syntax and Parameters

Use the srvctl upgrade database command as follows:

srvctl upgrade database -db db_unique_name -oraclehome Oracle_home

Table A-211 srvctl upgrade database Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-oraclehome Oracle_home

The path to the ORACLE_HOME