Wednesday, December 9, 2020

DBCA Silent Mode for Container Database

# ---------------------------------------------------------------------
# glogin.sql
# ---------------------------------------------------------------------
# Modify the configuration of GLOGIN to show you better results.

cat >> $ORACLE_HOME/sqlplus/admin/glogin.sql <<EOF
set pages 700 lines 700 timing on time on colsep '|' trim on trims on numformat 999999999999999 heading on feedback on
COLUMN NAME FORMAT A20
COLUMN FILE_NAME FORMAT A80
SET SQLPROMPT '&_user@&_connect_identifier> '
DEFINE _EDITOR=vi
EOF

# ---------------------------------------------------------------------
# Database Creation Version 19c (With CDB/PDB on ASM Disks)
# SINGLE Create Database Silent on ASM and Container True

dbca -silent -createDatabase -templateName General_Purpose.dbc \
  -gdbName cdbprod \
  -sid cdbprod \
  -createAsContainerDatabase true \
  -databaseConfigType single \
  -SysPassword Welcome1 \
  -SystemPassword Welcome1 \
  -emConfiguration NONE \
  -storageType ASM \
  -datafileDestination +DATA \
  -redoLogFileSize 200 \
  -characterSet AL32UTF8 \
  -enableArchive true \
  -archiveLogMode auto \
  -recoveryAreaDestination +FRA \
  -memoryPercentage 50 \
  -dbOptions IMEDIA:false,CWMLITE:false,SAMPLE_SCHEMA:false,ORACLE_TEXT:false,APEX:false,OMS:false,DV:false,JSERVER:false,SPATIAL:false

# ---------------------------------------------------------------------
# This is to setup the password of your new CDP, necessary when you use DBCA Silent.
# ---------------------------------------------------------------------

orapwd dbuniquename=cdbprod file='+DATA' force=y entries=10 password="Welcome1+"

# ---------------------------------------------------------------------
# Validate the Database Creation
# ---------------------------------------------------------------------

srvctl config database -db cdbprod

No comments:

Post a Comment