This page covers two options for creating a new database. They are:

  • Graphical
  • Silent

Graphical Creation

The following steps will guide you through the creation of a new database using the graphical wizard.

Use the Database Creation Assistant to create a new database. At the end of the wizard you will have a choice of saving a response file. We will use that for the silent creation.

To run the wizard, type:

$ORACLE_HOME/bin/dbca

Here are some standard options for creating a traditional database...

Database Operation

  • Create a database

Creation Mode

  • Single Instance Database
  • Advanced configuration

Deployment Type

  • Custom Database

Database Identification

  • Global database name
  • SID
  • Uncheck "create as Container database"

Storage Option

  • Database files storage type: File System
  • Check "Use Oracle-Managed Files (OMF)"

Fast Recovery Option

  • Check "Specify Fast Recovery Area"
  • Give it a "Fast Recovery Area size" suitable for several days worth of data

Network Configuration

  • Create a new listener
  • Listener name: LISTENER
  • Listener port: 1521

Database Options

  • Keep the default values

Configuration Options

  • Use Automatic Shared Memory Management
  • Place the slider at roughly 75% max memory

Management Options

  • Leave options unchecked

User Credentials

  • Use the same administrative password for all accounts

Creation Option

  • Create database
  • Generate database creation scripts

Summary

  • Press "Save Response File"

Congratulations on creating your new database!

Silent Creation

In order to use the Database Creation Assistant in silent mode, we need a response file. Let's use the one generated by the graphical creation.

With Response File

The one I created from from the choices above looks like this:

#file: dbca.rsp

responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0
gdbName=oemccdb
sid=oemccdb
createAsContainerDatabase=false
templateName=/opt/oracle/product/database-19.3/assistants/dbca/templates/New_Database.dbt
sysPassword=
systemPassword=
serviceUserPassword=
datafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/
datafileDestination={ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/
recoveryAreaDestination={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}
storageType=FS
characterSet=AL32UTF8
nationalCharacterSet=AL16UTF16
variables=ORACLE_BASE_HOME=/opt/oracle/product/database-19.3,DB_UNIQUE_NAME=oemccdb,ORACLE_BASE=/opt/oracle/product,PDB_NAME=,DB_NAME=oemccdb,ORACLE_HOME=/opt/oracle/product/database-19.3,SID=oemccdb
initParams=undo_tablespace=UNDOTBS1,sga_target=8040MB,db_block_size=8192BYTES,nls_language=AMERICAN,dispatchers=(PROTOCOL=TCP) (SERVICE=oemccdbXDB),diagnostic_dest={ORACLE_BASE},remote_login_passwordfile=EXCLUSIVE,db_create_file_dest={ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,processes=320,pga_aggregate_target=2680MB,nls_territory=AMERICA,local_listener=LISTENER_OEMCCDB,db_recovery_file_dest_size=7851MB,open_cursors=300,compatible=19.0.0,db_name=oemccdb,db_recovery_file_dest={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME},audit_trail=db
memoryPercentage=40
databaseType=MULTIPURPOSE
automaticMemoryManagement=false

Without Response File

run 'dbca' to create database.

export PASSWD="p@ssw0rd"
export SID=orcl

dbca -silent \
  -createDatabase \
  -templateName General_Purpose.dbc \
  -sid $SID \  
  -gdbname $SID.$HOSTNAME \
  -responseFile NO_VALUE \
  -characterSet AL32UTF8 \
  -memoryPercentage 70 \
  -emConfiguration NONE \
  -sysPassword $PASSWD \
  -systemPassword $PASSWD

The 'netca' application should have a 'silent' option too...

TODO: Let's figure out how that works!