Drop and Uninstall Oracle Database

Sometime you may need to drop Oracle database to clean up the Instance or completely uninstall to decommission the box. With this article, you will learn to drop database and to uninstall Oracle Software. This exercise was performed on Oracle Linux 6.6 server that has Oracle 11g installed. We will first delete/drop Oracle SID DEV and then un-install the Oracle 11g Software completely from the Linux Server.

Drop Oracle Database:

The Oracle drop database statement drops the database and deletes all control files and data files listed in the control file and spfile it used. This does not remove archived logs and backups but this can be cleared using RMAN. The drop statement is helpful when you want to drop a test database or old database after successful migration to a new host.

Drop Database;

[oracle@orcleprod ~]$ export $ORACLE_SID=DEV
[oracle@orcleprod ~]$ echo $ORACLE_SID

SQL> startup mount exclusive restrict;
ORACLE instance started.

Total System Global Area 2187993088 bytes
Fixed Size                  2215184 bytes
Variable Size            1241514736 bytes
Database Buffers          939524096 bytes
Redo Buffers                4739072 bytes
Database mounted.

SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

DBCA  Database Configuration Assistant is an Oracle utility is an alternative to drop database statement. This opens an universal installer which lets you do more than just dropping an existing database. To drop a database run the following steps. This will let you modify or add database to  Oracle Instance.
  1. Launch Xming Server
  2. Enable X11 on Putty
  3. Connect to Oracle Host using oracle account
  4. Run dbca
  5. A universal window will popup, follow the instructions to drop database.

Uninstall Oracle Database Software:

Oracle recommends the best way to uninstall Oracle Software is to run the installation tool. Only the oracle used can run the installation or de-install of the software. The default method for running the un installation  is from the de-install directory in the Oracle home as the owner.

cd $ORACLE_HOME/deinstall

Interested in working with me? I can be reached at pbaniya04[at] for any questions, consulting opportunities or you may drop a line to say HELLO. Thank your again for visiting my blog and looking forward to serving you more.

Have a Database-ious Day!

No comments

Powered by Blogger.