Thursday, January 20, 2011

Cleanly uninstall/deinstall Oracle Database (10g)

In this post I'll describe steps to cleanly uninstall your oracle database off your Microsoft Windows system (Windows XP / Server 2003).  In my case I was using the Oracle Database 10g.  Follow this step if you want to reinstall oracle cleanly.  (I believe you may follow similar steps on other Microsoft Windows version and other Oracle Database version)
  1. Turn off any oracle related services from Start-Run-Services.msc or Control panel-Administrative Tools-Services.
    Turn off the services in this order : Oracle MTS - iSQLPlus - Listener - Oracle Instance (you may not have all the services I listed installed).
  2. Use The Oracle Universal Installer to uninstall/deinstall the Oracle database.
    When you use the Oracle Universal Installer (OUI) to uninstall Oracle database,it left out bits and pieces of data in your operating system.  So, after uninstalling using the OUI you may want to clear up some mess left by the oracle.
  3. Open up regedit (Start - Run - regedit) then find this references (if you can, if you didn't find it it was deleted by the OUI) and delete it.  
    • HKEY_CURRENT_USER\SOFTWARE\ORACLE
    • HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle.oracle 
    • Delete the reference starting with ora in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.  (You may have more than one reference.)
    • Reboot the operating system
    • Delete the oracle base directory <usually its located in c:\oracle>
    • Delete the oracle folder in program files <usually it's located in c:\program files\oracle>
    • (Optional) You may want to clear/delete the temp folder (c:\TEMP)
    • Remove any Oracle references from Environment Variable (usually in your path)
      Start-Settings-Control Panel-System-Advanced-Environment Variables
      Edit the environment variables PATH and system PATH.
    • Remove Oracle.DataAccess and any Polic.Oracle files from the GAC (if any) at C:\Windows\assembly\
    • Clear the recycle bin

    1 comment: