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
Updating network configuration files
Deleting instance and datafiles
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