How to delete a database in Oracle 11 without using DBCA
This short tutorial will show you how to delete a database from Oracle 11 without using DBCA (Database Configuration Assistant.
1-SID of the imported database, if not defined
- Export ORACLE_SID = database
2-connect to the database with OS Authentication
- [Oracle @ Oracle11 ~] $ Sqlplus/as sysdba
-
- SQL * Plus: Release11.2.0.1.0Production on MonDec117: 38: 022014
- Copyright (c) 1982,2009, Oracle. All rights reserved.
- Connected to an idle instance.
3-start a database instance
- SQL> startup
-
- ORACLE instance started.
- TotalSystemGlobalArea3340451840 bytes
- FixedSize2217952 bytes
- VariableSize1828718624 bytes
- DatabaseBuffers1493172224 bytes
- RedoBuffers16343040 bytes
- Database mounted.
- Database opened.
4-Shut down the database
- SQL> shutdown immediate;
-
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
5-enable exclusive mode
- SQL> startup mount exclusive restrict
-
- ORACLE instance started.
-
- TotalSystemGlobalArea3340451840 bytes
- FixedSize2217952 bytes
- VariableSize1828718624 bytes
- DatabaseBuffers1493172224 bytes
- RedoBuffers16343040 bytes
- Database mounted.
6-delete a database
- SQL> drop database;
- Database dropped.
- DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.1.0-64 bitProduction
- With the Partitioning, OLAP, DataMiningandRealApplicationTesting options
Done!