Pages

Saturday, 15 March 2014

Steps to drop an Oracle Database

The below commands in seqeunce can be used from a sqlplus prompt for dropping a database.

Step 1:
Set the Oracle SID to the instance to be dropped. This is important as this ensures that you connect to the correct instance.

export ORACLE_SID=<SID>
ex: $export ORACLE_SID=GTDB
Step 2:
Login to sqlplus as a Sysdba or connect to user with the dba privilege.

sqlplus "/as sysdba"
or
sqlplus dbauser/<pwd>
Step 3:
Execute the below commands in sequence.


startup mount;
alter system enable restricted session;
drop database;
This drops the selected instance of the database.

No comments:

Post a Comment