How to drop an Oracle Database using dbca in silent mode?

I have one 12c (12.2) database called “TEST” that is running in archivelog mode, and for some reason I want to drop this database.

grid@test01:~$ ps -ef|grep pmon
grid 11233 1 0 21:32:47 ? 0:03 asm_pmon_+ASM
oracle 11360 1 0 21:33:19 ? 0:07 ora_pmon_TEST

Unfortunately, I can’t run dbca in GUI mode, so, I want to drop this database in a text silent mode, How can I do that?

We can simply use the following command to run the dbca in silent mode and drop the database:

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

Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
48% complete
52% complete
Deleting instance and datafiles
76% complete
100% complete
Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/TEST.log” for further details.

That is all.
If we check the status of the database from the grid side:

grid@test01:~$ srvctl status database -d TEST
PRCD-1120 : The resource for database TEST could not be found.
PRCR-1001 : Resource ora.ethix.db does not exist

Also, the above procedure will cleanly remove the datafiles and archivelogs.
Also, it will de-register the database from the listener.


Donate to support our blogging work



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s