Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to delete an oracle instance (oracle created in the AIX 6.0 OS. I know i can delete all the dbf and ctl files in the Terminal but i thinks that's no the best way to do it. I think must be a cleaner way to do that.

Thanks in advance.

share|improve this question
up vote 9 down vote accepted

You can delete databases with DBCA which takes care of most of it.

Or you can do as below, but this will do the same as removing the datafiles, redo logs, controlfiles manually.

sqlplus / as sysdba
startup mount exclusive restrict
rman target /
drop database including backups noprompt;

After this, you still have to remove the entry that belongs to the database from /etc/oratab, remove init.ora/spfile, password file from $ORACLE_HOME/dbs, and clean log directories (adump, bdump, cdump, udump).

share|improve this answer

If you decide to use DBCA to delete the database, you can do this:

If you want to completely remove an Oracle 10.2g instance from an Oracle home directory you first need to identify the instance in the oratab file. For example, this entry shows that the testdb Oracle database instance is associated with the following ORACLE_HOME:


Next, you need to set the environment for the database that you want to remove, for example:

ORACLE_SID = [testdb] ? mydb

Now you can start the Database Configuration Assistant (DBCA):


Then, select the Database to delete (mydb) and click finish.

Removing an Oracle database deletes all of the data in the database. For example, among other things, this action will delete:

1) All files resulting from this query (for mydb):

SELECT name FROM v$datafile
SELECT name FROM v$controlfile
SELECT name FROM v$tempfile
SELECT member FROM v$logfile

2) Entry associated with mydb in oratab

3) Entries associated with mydb in listener.ora and tnsnames.ora

You can also delete a database using DBCA in silent mode. For example, for single instance database:

dbca -silent -deleteDatabase -sourceDB <Oracle_Sid>

If you want to keep this data, make sure that you back up the database before deleting it.

Starting with Oracle Database 11g Release 2 (11.2), you can take advantage of the deinstall command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.