Create Oracle CDB using DBCA silent method:

If you want to create an Oracle CDB using DBCA silent method then you are in the right place. Just go through the article and at the end of this article, you can easily create Oracle CDB using DBCA silent method.

Step 1) Open the putty/MobaXterm software as Oracle to connect from a Windows machine to a Linux machine:

Hostname – 192.168.56.11
Username – oracle
Password – oracle123

Step 2) Find the Software Installation Path:

To create a database manually, first, we have to install the Oracle software on the server. If the software already exists, find the Oracle software location and note it down. If it does not exist, you can follow my article Install Oracle Software.

cat /etc/oraInst.loc
cat /u01/app/oraInventory/ContentsXML/inventory.xml

Create Oracle CDB using DBCA silent method:

Step 3) Export the ORACLE_HOME & PATH. Also, prepare the silent container database creation script:

You can refer to the article for DBCA silent mode command if you need additional details.

export ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH

vi /home/oracle/dbcreate_cdb19c.sh

dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname cdb19c -sid cdb19c -responseFile NO_VALUE -characterSet AL32UTF8 -totalmemory 1024 -emConfiguration LOCAL -createAsContainerDatabase true -sysPassword sys123 -systemPassword sys123 -sampleSchema true

wp!

Create Oracle CDB using DBCA silent method:

Step 4) Run the above-created File to Create a CDB Database:

sh -x /home/oracle/dbcreate_cdb19c.sh

CDB using DBCA silent method

Step 5) Now the database cdb19c has been created and the same has been added in the /etc/oratab file:

Create Oracle CDB using DBCA silent method:

Step 6) Set the environment and crosscheck the details. We will see there is no listener. So we have to create it.

Create Oracle CDB using DBCA silent method:

Step 7) Configure the Listener to connect both CDB(root container) and PDB:

vi /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora

L1 =
(DESCRIPTION = (ADDRESS = (HOST = 192.168.56.11)(PORT = 1522)(PROTOCOL = TCP)))

SID_LIST_L1=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = cdb19c)
(SID_NAME = cdb19c)
(ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1)
)
(SID_DESC =
(GLOBAL_DBNAME = pdb1)
(SID_NAME = cdb19c)
(ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1)
)
)

ADR_BASE_L1 = /u01/app/oracle

:wq!

Create Oracle CDB using DBCA silent method:

Step 8) Start the listener:

lsnrctl start L1

Create Oracle CDB using DBCA silent method:

Step 9) Connection String Creation:

vi /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/tnsnames.ora

cdb1 =
(DESCRIPTION = (ADDRESS = (HOST = 192.168.56.11)(PORT = 1522)(PROTOCOL = TCP))
(CONNECT_DATA = (SERVICE_NAME = cdb19c))
)

pdb1 =
(DESCRIPTION = (ADDRESS = (HOST = 192.168.56.11)(PORT = 1522)(PROTOCOL = TCP))
(CONNECT_DATA = (SERVICE_NAME = pdb1))
)

:wq!

Create Oracle CDB using DBCA silent method:

Step 10) Check the CDB database details:

Create Oracle CDB using DBCA silent method:

Step 11) Create the pluggable database:

create pluggable database pdb1 admin user admin identified by admin123 file_name_convert=(‘/u01/app/oracle/oradata/CDB19C/pdbseed/’,’/u01/app/oracle/oradata/CDB19C/pdb1/’);

Create Oracle CDB using DBCA silent method:

Step 12) Connect to the pluggable database:

Create Oracle CDB using DBCA silent method:

Congratulations! You have created Oracle CDB using DBCA silent method.

Leave a Reply