create_database

Creates a database.

Format

emcli create_database
       [-dbType="type_of_database"]
       [-hostTargets="list_of_host_targets"]
       [-cluster="cluster_target_name"]
       -oracleHome="Oracle_Home_location"
       -gdbName="global_database_name"
       -templateName="path_and_display_name_of_the_software_library_entity"
       -hostCreds="named_credential_for_OS_user"
       -sysCreds="named_credential_for_SYS_user"
       -systemCreds="named_credential_for_SYSTEM_user"
       -dbsnmpCreds="named_credential_for_DBSNMP_user"
       [-sid="database_system_identifier"]
       [-racConfigType="RAC_configuration_type"]
       [-nodeList="comma-separated_node_names"]
       [-serverPoolList="comma-separated_list_of_server_pools"]
       [-newServerPool="new_server_pool_name_and_cardinality"]
       [-racOneServiceName="service_name_for_RAC_one-node_database"]
       [-templateInSwlib="TRUE|FALSE"]
       [-templateStageLocation="temporary_directory_on_agent_side"]
       [-storageType="FS|ASM"]
       [-dataFileLocation="Location_of_data_files "]
       [-recoveryAreaLocation="Fast_Recovery_Area_location "]
       [-enableArchiving]
       [-useOMF]
       [-listeners="comma-separated_list_of_listeners_database"]
       [-newListener="new_listener_and_port"] 

[ ]  indicates that the parameter is optional

Options

  • dbType

    Type of database that needs to be created. Valid values are:

    • SINGLE_INSTANCE —To create a database on one particular host or a list of hosts.

    • RAC — To create a cluster database on multiple nodes.

    • RACONE — To create a RAC One-node database.

    RAC and RACONE require the use of the cluster option.

  • hostTargets

    Comma-separated list of host targets where a single-instance database needs to be created. This is a mandatory option for a SINGLE_INSTANCE database.

  • cluster

    Cluster target name for the RAC database on which a cluster needs to be created. The target name should be valid and should have at least one node attached to the target. This is a mandatory option for RAC and RACONE databases.

  • oracleHome

    Oracle home of the host targets or cluster target. The Oracle home should be present in all of the targets.

  • gdbName

    Global database name of the database.

  • templateName

    Fully-qualified path and display name of the software library entity.

  • hostCreds

    Named host credentials of the user who owns the Oracle Home installation.

  • sysCreds

    Named database credentials to be used to create the SYS user.

  • systemCreds

    Named database credentials to be used to create the SYSTEM user.

  • dbsnmpCreds

    Named database credentials to be used to create the DBSNMP user.

  • sid

    Database system identifier., which can be a maximum length of 12 for SINGLE_INSTANCE, 8 otherwise. This should be alphanumeric, with the first character being an alpha character.

  • racConfigType

    RAC configuration type. Valid values are:

    • POLICY_MANAGED

    • ADMIN_MANAGED

    The default is ADMIN_MANAGED if not provided.

  • nodeList

    List of valid node names for ADMIN_MANAGED RAC databases. If not provided, all the nodes for the given cluster target are used.

  • serverPoolList

    Comma-separated list of server pool names for POLICY_MANAGED RAC databases.

  • newServerPool

    Note:

    You can either use serverPoolList or newServerPool, but not both. For newServerPool, cardinality is mandatory and should be a positive integer greater than 0.

  • racOneServiceName

    Service name for the RAC One Node database.

  • templateInSwlib

    Boolean value stating whether the template is from the software library. Valid values are TRUE if the template is from the software library, otherwise FALSE. The default is FALSE if you do not provide this option.

  • templateStageLocation

    Fully-qualified path to where the template should be staged on the host target.

  • storageType

    Type of storage preferred for the database. Valid values are:

    • FS for File System. This is the default if the option is not provided.

    • ASM for Automatic Storage Management.

  • dataFileLocation

    Location of the data files.

  • recoveryAreaLocation

    Fast Recovery Area location.

  • enableArchiving

    Indicates whether archiving of the database is required. Valid values are TRUE if archiving is required, otherwise FALSE. The default is FALSE.

  • useOMF

    Indicates whether to use Oracle Managed Files.

  • listeners

    Comma-separated list of listeners (name:port) to register the created database. This is for the SINGLE_INSTANCE database type only, and will be ignored for a RAC database.

  • newListener

    New listener (name:port) creates a new listener and registers the database. This is for the SINGLE_INSTANCE database type only, and will be ignored for a RAC database.

Examples

Example 1

emcli create_database -oracleHome=/u01/app/oracle/product/11.2.0/dbhome_2 -gdbName=testRACCli -hostCreds=cluster_named -sysCreds=sys -systemCreds=system -dbsnmpCreds=dbsnmp 
                       -templateName=/u01/app/oracle/product/11.2.0/
dbhome_2/assistants/dbca/templates/General_Purpose.dbc -dbType=RAC -cluster=cluster1
                       -dataFileLocation=/u01/share/oradata -recoveryAreaLocation=/u01/share/fra 

Example 2

emcli create_database -oracleHome=/u01/app/oracle/product/11.2.0/dbhome_2 -gdbName=testdbee -hostCreds=cluster_named
                       -sysCreds=sys -systemCreds=system -dbsnmpCreds=dbsnmp -templateName=/u01/app/oracle/product/11.2.0/
dbhome_2/assistants/dbca/templates/General_Purpose.dbc
                       -dbType=RAC -cluster=cluster1 -racConfigType=POLICY_MANAGED -newServerPool=sp1:2