oakcli create database

Use the oakcli create database command to create additional databases on Oracle Database Appliance.

When you run oakcli create database, the command prompts you for further inputs.

Syntax

oakcli create database -db db_name [[[-oh home] | [-version version]] [-params params_file] [-cdb]][h]

Parameters


Parameter Description

-db db_name

Name of the database that you want to create

-oh home

(Optional) Name of an existing Oracle home to use when creating the database. By default, the command creates a new database home.

-version version

(Optional) Version of the database that you want to create. By default, Oracle Database Appliance uses the highest version that you have downloaded.

-params params_file

(Optional) Name of the configuration file. By default, Oracle Database Appliance uses the default configuration file.

-cdb

(Optional) Creates the database as a container database

-h

(Optional) Display help for using the command.


Usage Notes

  • The -oh and the -version parameters are mutually exclusive. Attempting to use both in the same command will generate an error.

  • When a database is created without identifying an Oracle home, a new Oracle home is created using a standard naming convention (for example, OraDb11203_home3). The number at the end of the name is incremented by one for each new home created with the same version number.

  • When you upgrade the database, infrastructure, and Oracle Grid Infrastructure, you must specify an existing home to create a new database.

  • If you try to create a database using the option -version version before downloading and unpacking the specific version database clone files, then the command will fail.

  • You can create configuration files with the oakcli create db_config_params command.

  • The prompt "Do you want to keep the data files on FLASH storage: [ Y | N ] " is only shown if you choose the OLTP database type and if there is some free space available on flash storage.

Examples

This section shows different scenarios for using the commandoakcli create database.

Creating a New Database Showing Prompts

When you run oakcli create database, you are prompted for several inputs. The options listed for each input depend on the platform on which you run the command. For example, Database Class options 9 and 10 are available only on Oracle Database Appliance X5-2.

The following command creates a database named mydb using an existing Oracle home named OraDb12102_home1:

oakcli create database -db mydb -oh OraDb12102_home1
 
Please enter the 'root'  password :
Please re-enter the 'root' password:
 
Please enter the 'oracle'  password :
Please re-enter the 'oracle' password:
 
Please enter the 'SYSASM'  password : (During deployment we set the
SYSASM password to 'welcome1'):
Please re-enter the 'SYSASM' password:
Please select one of the following for Database Deployment  [1 .. 3]:
1    => OLTP
2    => DSS
3    => In-Memory
1
Selected value is : OLTP
Please select one of the following for Database Deployment  [1 .. 3]:
1    => EE : Enterprise Edition
2    => RACONE
3    => RAC
3
Selected value is : RAC

Do you want to keep the data files on FLASH storage: [ Y | N ]?N
 
Specify the  Database Class (1. odb-01 '1 core, 8 GB memory'   2.
Others) [1]:2
 
Please select one of the following for Database Class    [1 .. 10]:
1    => odb-01s  (   1 cores ,     4 GB memory)
2    =>  odb-01  (   1 cores ,     8 GB memory)
3    =>  odb-02  (   2 cores ,    16 GB memory)
4    =>  odb-04  (   4 cores ,    32 GB memory)
5    =>  odb-06  (   6 cores ,    48 GB memory)
6    =>  odb-12  (  12 cores ,    96 GB memory)
7    =>  odb-16  (  16 cores ,   128 GB memory)
8    =>  odb-24  (  24 cores ,   192 GB memory)
9    =>  odb-32  (  32 cores ,   256 GB memory)
10   =>  odb-36  (  36 cores ,   256 GB memory)

Creating a New Database in an Existing Oracle Home

Create a database called sales1 in OraDb11203_home2:

oakcli create database -db sales1 -oh OraDb11203_home2

Creating a New Database from a Template

Create a database called sales2 from the salesdbtemplate.bconf file (by appending the default file extension to the file name provided). This example also creates a new Oracle home:

oakcli create database -db sales2 -params salesdbtemplate

Creating a New Database as a Container Database

Create a version 12.1.0.2 container database called sales3:

oakcli create database -db sales3 -version 12.1.0.2 -cdb

Creating an Enterprise Edition Database

Create a version 12.1.0.2 database named DBPROD from the database configuration file named dbprodconf:

oakcli create database -db DBPROD -version 12.1.0.2 -params dbprodconf

The oakcli create database command starts a wizard that requires some basic inputs such has the root, oracle and SYSASM password. After you enter the password information, specify the type of database and running node:

Please select one of the following for Database Deployment [1 .. 3]:
Selected value is: ODADBI2-base

1 => EE : Enterprise Edition
2 => RACONE
3 => RAC1

Selected value is: EE

Please select one of the following 
for Node Number [1 .. 2]:

1 => ODADBI1-base
2 => ODADBI2-base2

Selected value is: ODADBI2-base

Specify the Database Class (1. Medium 2. Others) [1]:2Please select one of the following for

Database Class [1 .. 8] :
1    =>  odb-01s  (1 cores , 4 GB memory)
2    =>  odb-01  (1 cores , 8 GB memory)
3    =>  odb-02  (2 cores , 16 GB memory)
4    =>  odb-04  (4 cores , 32 GB memory)
5    =>  odb-06  (6 cores , 48 GB memory)
6    =>  odb-12  (12 cores, 96 GB memory)
7    =>  odb-16  (16 cores, 128 GB memory)
8    =>  odb-24  (24 cores, 192 GB memory)
9    =>  odb-32  (32 cores, 256 GB memory)
10   =>  odb-36  (36 cores, 256 GB memory)

3
Selected value is: 2 cores

The database class only defines the Oracle Database Configuration Assistant (DBCA) template to be used for the database creation. Oracle Database Appliance comes with eight templates and none can be added. See "Database Templates for Oracle Database Appliance" for template specifications.