Thursday, 10 June 2010

How to Manually Remove Oracle Server Software on Microsoft Windows Platforms

In this post, i would like to share the way of manual removal of oracle software from Microsoft Windows platforms, the recommended method to remove Oracle Server or client software is to use the Deinstall tool.  However there are times when you must do a manual check to see all software and environment settings are properly deleted.  This document will overview the steps necessary to ensure all items are removed from the Windows environment. Beginning with 11.2, the Oracle Universal Installer will no longer be used to remove Oracle software from an environment. However, a new Deinstall tool will be shipped with the Oracle Products

1.  Ensure you are logged in as a user with Local Administrative privileges.

2.  Stop all Oracle services related to the ORACLE_HOME (if any are running):
  • Right click (My) Computer > Manage > Services and Applications OR Configuration > Services.
  • Check the Path to Executable field in the Service's Properties if you are unsure from which ORACLE_HOME the service is running.
  • Close the Services and/or Computer Management window.
3.  Remove any databases using the Database Control Assistant (DBCA) running out of the ORACLE_HOME you are removing.  Remove any listeners using Net Control Assistant (NetCA) running out of the ORACLE_HOME you are removing.

4.  Remove the ORACLE_HOME from the OUI inventory:

%ORACLE_HOME%\OUI\BIN\oui -detachHome ORACLE_HOME=%ORACLE_HOME%

5.  Remove entries in the registry:
  • Start the registry editor:  choose Start > Run > regedit.
  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_< ORACLE_HOME> and delete that entry.
  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC.  Expand all subkeys and remove the key: "Oracle in < ORACLE_HOME>".
  • Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. Delete the keys where the name starts with Oracle and has an ImagePath string entry to the ORACLE_HOME to be deleted or a location under it.
  • Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ocfs and delete that entry.
  • Close regedit.
6.  Clean up the environment settings:
  • Right click on (My) Computer > Properties > Advanced tab OR Advanced System Settings link > Environment Variables button.
  • Under System Variables section, review all variables for any reference to the deleted ORACLE_HOME.  Edit by removing the ORACLE_HOME from the string value (such as removing the home from PATH statement) or by deleting the entire variable.  Common examples are CLASSPATH, ORACLE_HOME, PATH, and PERL5LIB.
  • Click OK to save and exit System Properties.
7.  Clean up the start menu icons:
  • Right click on the Start button and choose Explore All Users.
  • Expand Programs folder.
  • Delete the folder Oracle -< ORACLE_HOME>  and any subfolder.
8.  If this is the only ORACLE_HOME on the server, delete the Oracle folder under C:\Program Files.  DO NOT delete this if there are any other Oracle products on this server.

9.  Reboot the Windows server.

10.  Go to the TEMP/TMP directory and delete all files and directories.

11.  Go to the ORACLE_HOME location and verify all folders/files have been removed.

12.  Empty the Recycle Bin to clear all files.

13.  If you are deinstalling an ORACLE_HOME in a clustered environment (ASM or DB), you will need to check the above steps on all nodes of the cluster.

14.  If you are deinstalling an Oracle Clusterware Home (CRS_HOME), you will also need to do the following:
On all nodes, delete the clusterware drivers in the Windows drivers folder, usually C:\WINDOWS\System32\Drivers:
  • ocfs.sys 
  • oracleacfs.sys
  • oracleadvm.sys
  • oracleoks.sys
  • orafencedrv.sys
  • orafenceservice.sys
On all nodes in regedit, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and remove entries for OraFenceService and ocfs (if exists).

Empty the Recycle Bin on all nodes.

Related Posts by Categories



No comments: