Steps to drop database manually

In this document ,we will see how to drop an Oracle database. This article will work on Oracle 10g and 12c

[adrotate banner=”3″]

Prerequisite Steps

Find the location of the data files ,control files and online redo logs of the database to be dropped. Later point , we will cross verify , if those files are removed or not. Following commands can be used to store the details of the same.

SQL> select name from v$datafile;
SQL> select name from v$controlfile;
SQL> select member from v$logfile;

[adrotate banner=”3″]

Step 1 : Connect to the database with sysdba privilege

$ export ORACLE_SID=mydb
$ sqlplus "/ as sysdba"

Step 2 : Shutdown the database

SQL> shutdown immediate;

Step 3: Start the Database in Exclusive mode

SQL> startup mount exclusive restrict;

[adrotate banner=”3″]

Step 4: Drop the database

SQL> drop database;

Database dropped.

Step 5 : Post Change Steps

1) Cross verify if all the associated datafiles, comntrolfile and online redologs are removed
2) Remove the directories if not required
3) Remove the entry of the database from /etc/oratab
4) Modify/drop any of the scripts used for this database

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *