You can create and drop oracle database using DBCA silent method. In this article, I will show you the detailed steps for the same:
create and drop Oracle database using DBCA silent method:
Table of Contents
CREATE DATABASE:
Step 1) Open the Putty/Mobaxterm software to connect from a Windows machine to a Linux machine and set the environment variable:
Hostname - 192.168.56.11
Username - oracle
Password - oracle123
[oracle@machine1 ~]$ ps -ef|grep pmon
oracle 3456 1 0 12:42 ? 00:00:00 ora_pmon_orcl
[oracle@machine1 ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl

Step 2) Note down the template name: General_Purpose.dbc
cd $ORACLE_HOME/assistants/dbca/templates

Step 3) Copy the Response File to create database using dbca silent method:
cp /u01/app/oracle/product/19.3.0/dbhome_1/assistants/dbca/dbca.rsp /home/oracle/dbca-test.rsp

Step 4) Edit the copied Response File to create a database using dbca silent method:
vi /home/oracle/dbca-test.rsp
gdbName=test
templateName=General_Purpose.dbc
sysPassword=sys123
systemPassword=sys123
totalMemory=1024
or
memoryPercentage=40
:wq!





Step 5) Please follow the below command to create oracle database using dbca silent method :
dbca -silent -createDatabase -responseFile /home/oracle/dbca-test.rsp
Please note that the response file does not contain the dbOptions parameter. If we create a database
using the response file, all the database options will be created.
You can pass the dbOptions to the dbca command line to resolve the issue.
dbca -createDatabase -silent -responseFile /home/oracle/dbca-test.rsp -
dbOptions
JSERVER:true,DV:false,APEX:false,OMS:false,SPATIAL:false,IMEDIA:false,ORACLE_TEX
T:false,CWMLITE:false -sampleSchema true

Step 6) Congratulations! You have successfully created an Oracle database using DBCA silent method. Please check one of the below methods to verify the same:
Method 1: cat /etc/oratab
Method 2: ps -ef |grep pmon > sqlplus / as sysdba
Method 3: cd $ORACLE_HOME/dbs > ls -l *.ora

DROP DATABASE:
Step 1)Open the putty software to connect from windows machine to linux machine and Set the Environment Variable for the database that you want to drop:
Hostname - 192.168.56.11
Username - oracle
Password - oracle123
Step 2)Using DBCA Silent Method to drop(delete) database:
dbca -silent -deleteDatabase -sourceDB test -sysDBAUserName sys -sysDBAPassword sys123

Step 3) Congratulations! You have successfully dropped the oracle database using DBCA silent method. Please use the below commands to verify the same.
Method 1 : cat /etc/oratab
Method 2 : ps -ef |grep pmon > sqlplus / as sysdba
Method 3 : cd $ORACLE_HOME/dbs > ls -l *.ora

You can easily create and drop the Oracle database using the DBCA silent method. If you want to create an Oracle database using the DBCA GUI method, follow my other article ” Create Oracle database using GUI(Graphical User Interface Method)”
You can also follow the article Installing and Configuring Oracle Database Using Response Files for your reference.
Pingback: How to create Listener in Silent Mode: Easy Guide
Pingback: Create Oracle database manually
Pingback: How to create Oracle database using GUI