Difference between revisions of "Delete a database on Windows"
From dbawiki
| Line 2: | Line 2: | ||
Start:Run... services.msc | Start:Run... services.msc | ||
Double click on OracleService<SID>, the first part of "Path to executable" is the home | Double click on OracleService<SID>, the first part of "Path to executable" is the home | ||
| + | or | ||
| + | regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE | ||
| + | List of homes and their instances can be seen here. | ||
*Find location of files to delete: | *Find location of files to delete: | ||
Connect as sys and: | Connect as sys and: | ||
| Line 15: | Line 18: | ||
delete %ORACLE_HOME%\database\PWD<SID>.ora and any pfile, spfile and .dat files | delete %ORACLE_HOME%\database\PWD<SID>.ora and any pfile, spfile and .dat files | ||
Delete the files and directories shown by above queries | Delete the files and directories shown by above queries | ||
| + | *Check in Registry to make sure entries have gone from HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<home> | ||
Revision as of 14:50, 1 December 2011
- Check where the ORACLE_HOME for this instance is:
Start:Run... services.msc Double click on OracleService<SID>, the first part of "Path to executable" is the home or regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
List of homes and their instances can be seen here.
- Find location of files to delete:
Connect as sys and:
select name from v$datafile; select member from v$logfile; show parameter control show parameter dump show parameter archive_dest
- Stop the services related to the instance:
set ORACLE_HOME=<oracle home> oradim -delete -sid <SID>
- Clean up database files:
delete %ORACLE_HOME%\database\PWD<SID>.ora and any pfile, spfile and .dat files Delete the files and directories shown by above queries
- Check in Registry to make sure entries have gone from HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<home>