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 double 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