Archive

Archive for September, 2011

How to Drop Oracle Database ?

September 14, 2011 Leave a comment

CAUTION : DO NOT PERFORM THIS OPERATION IN YOUR PRODUCTION DATABASE FOR TESTING PURPOSE 🙂

With Oracle 10g release, Oracle Inc. has provided a sql command to Drop Database. Prior to Oracle 10g, the DBA had to physically delete the relevant files ( such as data files, control files, online redo log files & spfile )used by Oracle Database.

To drop the database, before even connecting the SQL prompt , make sure you have specified correct ORACLE_SID. You do not want to drop another db by accident.

Once you have specified/verified correct ORACLE_SID variable, now you need to shutdown the database via sql

SQL> Shutdown immediate;

Now, you need to to bring the database in exclusive restrictive mount mode

SQL> startup mount exclusive restrict;

Mount Database in exclusive restrict mode
Now just issue the drop database command

SQL> drop database;

Drop Database

NOTE : You can also perform whole of this activity via GUI utility provided by Oracle which is called dbca ( search for binary dbca in $ORACLE_HOME/bin dir) . That utility will behind the scenes take care of starting db in mount restrict mode & then based on your selection of db that you would want to drop, it will do so.

In case this activity was performed on windows server, then you need to also execute following command to remove service

oradim -DELETE -SID <name of instance>

 

Advertisements

All you need to know about the Oracle ACE program !!

September 11, 2011 Leave a comment
  • More information about ACE listed here …

  • Categories: ACE, Oracle blogroll Tags: