Drop an Oracle Database using SQLPlus - Drop Database

DBCA is one of the most popular method of dropping an Oracle database. I personally use SQLPlus method. It is simple, fast and removes the files from the storage as well. SQLPlus also doesn't verify the inventory information for the drop.

Please set the environment variables like $ORACLE_SID, $ORACLE_HOME, $PATH. If the database is already up and running, issue a shutdown first. Following are the order of commands:

$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount exclusive restrict;
SQL> drop database;
SQL> exit
Please wait for few minutes and you can see the database files are removed.

No comments:

Post a Comment