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: 243
Share this:
- Click to share on Facebook (Opens in new window) Facebook
- Click to share on LinkedIn (Opens in new window) LinkedIn
- Click to share on X (Opens in new window) X
- Click to share on Pinterest (Opens in new window) Pinterest
- Click to share on Telegram (Opens in new window) Telegram
- Click to share on WhatsApp (Opens in new window) WhatsApp