Do you want to remove the Oracle software, or do you want to remove a single database of the multiple databases on that machine? (I suspect you want the latter, right?)
If you wish to simply remove a single database and leave the Oracle software intact, then you do the following:
1) Identify all data files involved in the obsolete database.
a) Confirm the location and name of your init<SID>.ora parameter file. (This file name is the only database-related file that you cannot query for from your database.)
Then, with your obsolete database still up and running, do the following:
b) Confirm the names of your database control files:
Code:
col name format a60
select * from v$controlfile;
c) Confirm the names of your on-line redo log files:
Code:
col member format a60
select * from v$logfile;
d) Confirm the names of database data files:
Code:
col name format a60
select name from v$datafile;
2) For the sake of documentation (and as a CYA), make a human-readable, text-based backup copy of your database's configuration:
Code:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
This human-readable backup controlfile will reside in the directory that appears is your database instance's parameters as "USER_DUMP_DEST".
3) Shutdown your database for one last time.
4) Using your operating system's "copy" command of choice, backup ALL of the files that you identified in Steps 1 & 2, above.
5) Using your operating system's "file-erase" command (e.g., Windows "erase" or "del", Unix "rm", et cetera), delete all of the files you identified in Steps 1 & 2.
6) Cleanup residual references that may exist of your database:
a) On Windows, remove the obsolete database's service. From a command prompt, issue this command:
Code:
oradim -delete -sid <SID name>
b) On Unix, "vi" your "oratab" file to remove references to the defunct Oracle instance. On solaris, the "oratab" file resides in the "/var/opt/oracle" path; on most other *nix operating systems, "oratab" resides in the "/etc" path.
c) Edit your tnsnames.ora connectivity file to remove any references to the defunct Oracle instance.
Let us know if this is a useful checklist.
![[santa] [santa] [santa]](/data/assets/smilies/santa.gif)
Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services:
www.dasages.com]