How to drop a database using DBCA in silence mode

I have a 19c database which I would like to drop it using DBCA utility.

[[email protected] dbs]$ ps -ef|grep pmon
oracle 3943 1 0 09:28 ? 00:00:02 ora_pmon_cdb1
oracle 22864 20364 0 15:00 pts/1 00:00:00 grep --color=auto pmon
[[email protected] dbs]$

If we cannot use GUI, we have this command instead:

dbca -silent -deleteDatabase -sourceDB TEST -sysDBAUserName sys -sysDBAPassword sys -forceArchiveLogDeletion

Let’s see how it goes on my side:

[[email protected] dbs]$ dbca -silent -deleteDatabase -sourceDB $ORACLE_SID -sysDBAUserName sys -sysDBAPassword sys -forceArchiveLogDeletion
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
ORA-01109: database not open

65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb1_dgb/cdb1_dgb.log" for further details.

Looks good 🙂

Leave Comment

Your email address will not be published. Required fields are marked *