Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Trashing Oracle. [remove from NT: Metalink Note:62004.1]
-----begin excerpted material-----
Doc ID:
Note:62004.1
Subject:
Removing a Oracle Instance and Database from Windows NT Type: BULLETIN Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 30-JUN-1998 Last Revision Date: 26-MAR-2000 Language: USAENG
PURPOSE
SCOPE & APPLICATION
Related Notes
FROM COMMAND LINE Removing a Oracle Instance and Database from Windows NT
This bulletin makes the following assumptions:
o The SID of the instance to be removed is TEST. o The Oracle Home is C:\Orant. o Text surrounded by brackets, such as <filename>, is to be interpreted as a variable that needs to be replaced - without brackets - with an appropriate value of the type specified. o Oracle 7.3 ==> svrmgr23 , oradim73, rdbms73 Oracle 8.0 ==> svrmgr30 , oradim80, rdbms80 Oracle 8.1 ==> svrmgrl , oradim , rdbms In general svrmgrxx, oradimxx o To which instance is one connecting 1. LOCAL variable 2. ORACLE_SID Both can be defined at a) registry * LOCAL if the database has the default home HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE if the database has a non default home HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEyy (yy the home number of your database) * ORACLE_SID HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE b) my_computer\properties\Environment declared in - System Variables or - User Variables for user c) command prompt: input 'set local=TEST' 'set ORACLE_SID=TEST' Remark: no space around the equal sign - to use svrmgrxx, local should not be set - if ORACLE_SID validation happens in this order 1) registry 2) my_computer\properties\Environment System Variables 3) my_computer\properties\Environment User Variables 4) command prompt The latest declaration is taken into account f.e. in registry: ORACLE_SID=ORCL at command prompt: set ORACLE_SID=TEST ==> TEST is going to be used - To see if any of these variables (local,ORACLE_SID) is set outside the registry, open a command prompt and type 'set Local' 'set ORACLE_SID' If the variable is not set outside the registry, ==> 'Environment variable local not defined' Otherwise ==> C:\>set ORACLE_SID ORACLE_SID=or85 C:\>
1A. Start Server Manager.
From the Command Prompt * a1. Select Start\Run & Input 'Command' or a2. Start\Programs\Command Prompt b. Select OK. c. Input 'set ORACLE_SID=TEST' ? Remark: no spaces around the equal sign. ? Make sure there is nowhere a local variable defined. To make sure: - on Command Prompt: Input 'Set local' => 'Environment variable local not defined' ok - registry: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE or HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEyy (yy the home number of your database) - right click my computer\properties\Environment no local variable declared in - System Variables - User Variables for user e. svrmgrxx From the Windows NT Taskbar (check local and ORACLE_SID variable) a. Select Start\Run. b. Input svrmgrxx c. Select OK. From Program Manager (check local and ORACLE_SID variable) a. Select File\Run b. Input svrmgrxx c. Select OK. 1B. Input the following command at the SVRMGR> prompt: connect internal/<password> It should now state the following: Connected 2. Using the SPOOL and SELECT commands create a file that lists the full directory paths of the control, log and datafiles for TEST. The spool file will be used later to manually delete the files. SVRMGR> spool <filename> SVRMGR> select * from V$CONTROLFILE; SVRMGR> select * from V$LOGFILE; SVRMGR> select * from V$DATAFILE; SVRMGR> spool off SVRMGR> exit
3. Delete the instance, its services, pwd<SID>.ora and strt<SID>.ora.
3A. Use the Taskbar or Program Manager to open a Command Prompt window.
From the Windows NT Taskbar Select Start\Programs\Command Prompt. or Select Start\Run & Input 'Command' From Program Manager Select the Main icon followed by the Command Prompt icon. 3B. Input the following command and press Enter. oradimxx -delete -sid TEST
4. Verify the instance was deleted.
4A. Open and view the oradimxx.log.
From the Windows NT Taskbar a. Select Start\Programs\Windows NT Explorer. b. Go to the orant\rdbmsxx directory. c. Open the oradimxx.log file in Notepad. From File Manager a. Open Program Manager and Select the Main icon followed by the File Manager icon. b. Go to the orant\rdbmsxx directory. c. Open the oradimxx.log in Notepad. 4B. The ordimxx.log file should read: Deleting instance... Instance deleted. If it does, exit Notepad, exit the Explorer (or File Manager), and go to Step 5. Else, refresh the oradimxx.log file periodically until it states "Instance deleted." If refreshing the screen doesn't change the log, go to Step 5. Till 8.0.4 the Instance Manager had a Graphical User Interface where one could verify if which instances exist on the server. To display the GUI Instance Manager: type at the command prompt: ORADIMxx. 5. Verify the OracleStartTEST and OracleServiceTEST services were removed. For Oracle 8.1.x only the OracleServiceTEST existed 5A. Open the Windows NT Services window. From the Windows NT Taskbar a. Select Start\Settings\Control Panel. b. Select the Services icon. From Program Manager a. Select the Main icon. b. Select the Control Panel icon. c. Select the Services icon. 5B. Verify the following services are no longer present: OracleStartTEST and OracleServiceTEST. If they are, close the Services window, exit Control Panel, and go to Step 6 else to to Step 5C. 5C. Use the command line Instance Manager to manually delete the services. Be sure to replace <service> with the name of the service as it appears in Control Panel\Services. oradimxx -delete -srvc <service1>, <service2> 5D. Repeat Steps 5A and 5B to verify the services were successfully removed. If they have been deleted, close the Services Window, exit Control Panel, and go to Step 6. If not, either refresh the Control Panel\Services Window periodically until they are removed. Or, reboot the machine to force the removal of all services marked for deletion. 6. Manually delete the control, log and data files using Explorer or File Manager. 6A. Print the spool file created in Step 2. 1. Open the spooled file in Notepad. 2. Select File\Print. 3. Exit Notepad. 6B. Find and delete the control files, log files, and data files from the directories specified in the spooled file. 6C. Delete the orant\database\initTEST.ora file. Verify the pwdTEST.ora (a hidden file) and strtTEST.ora files are deleted. If not, delete them. 6D. Go to the Orant\Rdbmsxx\Trace directory. Delete all files associated with the TEST instance. 6E. Exit the Explorer (or File Manager). 7. Verify the ORACLE_SID parameter in the registry is set to an instance other than TEST CAUTION: One should use caution in editing the registry. Your system may not boot up if you inadvertently modify a critical system parameter. Before editing this file you may want to view the 'Help' in the registry. Review the topics, 'Exporting all or part of the registry to a text file', 'Importing some or all of the registry', and 'Restoring the registry'. 7A. Open the Registry Editor. From the Windows NT Taskbar a. Select Start\Run. b. Input regedt32 or regedit c. Select OK. From Program Manager a. Select File\Run. b. Input regedt32 c. Select OK. 7B. Select HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. A list of parameters should appear on the right pane. In that list, locate ORACLE_SID. If it's set to TEST, change it to another SID. 7C. Exit the Registry Editor. 8. Check the environment variables if nothing refers to the SID a. Start\Settings\Control Panel\System b. Choose the Tab Environment c. Check the system variables and the user variables if nothing refers to the old SID (f.e. ORACLE_SID=TEST). If so change appropriately: delete the key or change it to another SID.
9. The instance has been removed.
Remark: The Database Assistant (8.0) and Database Configuration Assistant(8.1) tools can do step 1 to 6 in an automated and graphical way. .
Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.
-----end excerpted material-----
On 6 Oct 2000, at 3:25, Mark Leith wrote:
Date sent: Fri, 06 Oct 2000 03:25:20 -0800 To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> From: "Mark Leith" <mark_at_cool-tools.co.uk> Subject: Trashing Oracle.
...
> Just wanted to double check with you guys - I am going to be trashing my NT
> 4, 8.0.4 test instance
...
> Anyway, I am going to totally wipe Oracle and start over a again, and just Received on Fri Oct 06 2000 - 11:17:37 CDT
![]() |
![]() |