Through this article, we will learn to drop a whole database in Oracle manually with commands. We can also use the DBCA utility to drop a whole database but this is not in scope for today’s discussion.
Steps to follow for dropping a database
Please follow the below steps to drop a database successfully.
Please set the environment for the database and shut it down using the below command.
$ export ORACLE_SID=TESTDB
$ sqlplus / as sysdba
SQL> shutdown immediate;
Then mount the database in exclusive restrict mode using the below command.
SQL> startup mount exclusive restrict
And then drop the database using the below command
SQL> drop database;
Now your database has been dropped successfully.
Views: 170