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.

2 Answers 2


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).


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.

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

dbca -silent -deleteDatabase -sourceDB <Oracle_Sid>

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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