Oracle/Database/Oracle Client Uninstall

How to Remove the Oracle Client Software Before Reinstalling [ID 124506.1]
How to Remove the Oracle Client Software Before Reinstalling [ID 124506.1]

Modified 19-APR-2011    Type BULLETIN     Status PUBLISHED

Checked for relevance on 25-FEB-2010

PURPOSE ---

To describe how to remove Oracle Client Software from a Windows platform.

SCOPE & APPLICATION ---

Only follow the steps below to remove Oracle Client Software Versions 7.x, 8.x, 9.x, 10.x and 11.x. This note addresses the removal of both 32-bit and 64-bit software. If you have an Oracle database installed on this computer please see instructions specific to the removal of an Oracle Database under the section "Related Documents" at the end of this article.

---      PROCEDURE FOR REMOVING ORACLE CLIENT SOFTWARE BEFORE REINSTALLING (a.k.a. CLEAN UNINSTALL/COMPLETE RIP-OUT) --- WARNING: This procedure will remove ALL Oracle Client Software from your computer. Please make an image backup of your computer before performing these steps. If you do not want to remove ALL of your Oracle Client Software, please do not perform this procedure.

1. Log into the Windows operating system as a user with Administrator privileges.

a. Windows 95/98 i.   This in not necessary as FAT16 and FAT32 file systems do                  not support file level security. Windows NT/2000/XP/2003/Vista/2008/7 ii. This is necessary if using the NTFS file system.

2. If using ODBC, go into the ODBC Administrator and remove any Data Source Names (DSNs) inside of the User, System, and File DSN tabs that have been created against any of the following Oracle ODBC drivers:

i.   Oracle in [Home_Name]  (i.e. Oracle in OraHome92) ii. Oracle ODBC Driver iii. Oracle73 Ver 2.5 driver

You may want to click the Configure option and note any relevant information about each DSN. If you are not using ODBC, skip this step.

a. Windows 95/98/NT i.   Start | Settings | Control Panel | Data Sources (ODBC) Windows 2000 ii. Start | Settings | Control Panel | Administrative Tools | Data Sources (ODBC) Windows XP/2003/Vista/2008/7 (32-bit)

iii. Start | Control Panel | Administrative Tools | Data Sources (ODBC)

or

Start | Control Panel | System and Maintenance | Administrative Tools | Data Sources (ODBC)

Windows XP/2003/Vista/2008/7 (64-bit)

There are two ODBC Administrators on a Windows 64-bit OS. The 64-bit version is in the usual location:

iv. Start | Control Panel | Administrative Tools | Data Sources (ODBC)

or

Start | Control Panel | System and Maintenance | Administrative Tools | Data Sources (ODBC)

If using 32-bit Oracle software on a 64-bit OS, additionally check the 32-bit ODBC Administrator located here:

v.   C:\WINDOWS\SysWOW64\odbcad32.exe

NOTE: For more information see Note 308645.1.

b. Check the User, System, and File DSN tabs

c. You may notice that under the Drivers tab the version of the Oracle ODBC driver is listed as "Not Marked". If this is the case, please follow Note 170676.1 which is referenced in the "Related Documents" section at the end of this article before continuing these steps.

3. If using any of the following components:

- Oracle Data Provider for .NET (ODP.NET)

- Oracle Developer Tools for .NET (ODT.NET)

- Oracle Database Extensions for .NET (ODE.NET) AND the Oracle Database resides on the same machine as the Oracle Client Software AND you are completely removing the database software as well using this note

- Oracle Providers for ASP.NET (OPASP.NET) which includes the following:

- Oracle Membership Provider for ASP.NET - Oracle Role Provider for ASP.NET - Oracle Site Map Provider for ASP.NET - Oracle Session State Provider for ASP.NET - Oracle Profile Provider for ASP.NET - Oracle Web Event Provider for ASP.NET - Oracle Web Parts Personalization Provider for ASP.NET - Oracle Cache Dependency Provider for ASP.NET

then you should remove the corresponding assemblies related to these components that may reside in your Global Assembly Cache (GAC):

Component    Possible Assembly Names found in the GAC -    ---        ODP.NET       Oracle.DataAccess, Policy.X.X.Oracle.DataAccess ODT.NET      Oracle.VsDevTools, Oracle.Management.Omo ODE.NET      Oracle.Database.Extensions OPASP.NET    Oracle.Web (all providers contained in a single assembly)

NOTE: The ODP.NET was not available until 9.2. The ODT.NET was not available until 10.1.0.4.0. The ODE.NET was not available until 10.2.0.1.0. The OPASP.NET was not available until 11.1.0.6.20 and requires .NET Framework 2.0 or later.

a. Open a Visual Studio .NET Command Prompt (if you do not have          Visual Studio installed see the NOTE below) Windows 2000/XP/2003/Vista/2008/7 i.  Start | Programs | Microsoft Visual Studio .NET 200X | Visual Studio .NET Tools | Visual Studio .NET 200X Command Prompt

b. List the ODP.NET assemblies using the following command:

C:\> gacutil /l Oracle.DataAccess

You should see output similar to the following:

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

The Global Assembly Cache contains the following assemblies: Oracle.DataAccess, Version=10.1.0.401, Culture=neutral, PublicKeyToken=89b483f429c47342, Custom=null

The cache of ngen files contains the following entries:

Number of items = 1

c. Remove the ODP.NET assemblies using the following command:

C:\> gacutil /u Oracle.DataAccess

You should see output similar to the following:

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Assembly: Oracle.DataAccess, Version=10.1.0.401, Culture=neutral, PublicKeyToken=89b483f429c47342, Custom=null Uninstalled: Oracle.DataAccess, Version=10.1.0.401, Culture=neutral, PublicKeyToken=89b483f429c47342, Custom=null

Number of items uninstalled = 1 Number of failures = 0

d. List the ODP.NET Publisher Policy assemblies using the following command:

C:\> gacutil /l

Scroll through ALL of the output and identify files with names like

Policy.10.1.Oracle.DataAccess.dll Policy.9.2.Oracle.DataAccess.dll

e. Remove EACH of the identified ODP.NET Publisher Policy assemblies using the following command:

C:\> gacutil /u Policy.X.X.Oracle.DataAccess

You should see output similar to step c above.

f. Use the GACUTIL List command (see step d above) to look for the presence of ODT.NET assemblies. If found, remove them using the following commands:

C:\> gacutil /u Oracle.VsDevTools

C:\> gacutil /u Oracle.Management.Omo

g. Use the GACUTIL List command (see step d above) to look for the presence of ODE.NET assemblies. If found, remove them using the following command:

C:\> gacutil /u Oracle.Database.Extensions

h. Use the GACUTIL List command (see step d above) to look for the presence of OPASP.NET assemblies. If found, remove them using the following command:

C:\> gacutil /u Oracle.Web

The Global Assembly Cache (GAC) should now be free of all Oracle assemblies.

NOTE: If GACUTIL cannot be found on your machine, you can also remove these assemblies by opening the "C:\Windows\Assembly" folder. Find the name of the assembly you want to remove. Right-click the name and choose "Uninstall". This will accomplish the same thing as above without reference counting which should not be an issue during a rip-out/reinstall.

4. Stop all running Oracle Services and Oracle related services from the Services Control Panel. There may not be any of these services running on   your computer.

a. Windows 95/98 i.   Windows 95 and 98 cannot run services and will not have a                  Services control panel.

Windows NT           ii. Start | Settings | Control Panel | Services

Windows 2000 iii. Start | Settings | Control Panel | Administrative Tools | Services

Windows XP/2003/Vista/2008/7 iv. Start | Control Panel | Administrative Tools | Services

or

Start | Control Panel | System and Maintenance | Administrative Tools | Services

b. Stop any services that are running with the name OracleXXX

c. Additionally, check for and stop any of the following 3rd-party services which may place locks on certain Oracle software files:

i.   Debug Diagnostic Service ii. (Microsoft) Distributed Transaction Coordinator (MSDTC) iii. (Internet Information Server) IIS Admin iv. All SQL Server Services v.   Any 3rd-party Application Services (that interface with Oracle)

5. NOTE: Before performing this step make a backup of any important files located under the ORACLE_HOME directory such as the

TNSNAMES.ORA SQLNET.ORA

if you will need information from these files in order to setup/configure the new Oracle software.

Open the Oracle Installer and uninstall all Oracle Client Software. You should be able to remove everything except the installer itself. If there is a problem removing any particular component, skip it and continue removing the rest of the components. Perform this step for each Oracle Home you have installed on the computer.

a. If for some reason the Oracle Installer will not run, you can skip this step and continue on to the next one. The software will be         manually removed in step 7.

b. If you are removing Oracle 9.2 software, be sure to use the latest Oracle Universal Installer if multiple installers exist. Check for an Oracle Universal Installer located under

Start | Programs | Oracle - OraHome92 | Oracle Installation Products | Universal Installer

If it exists, use this version to remove the software, otherwise use the version located here

Start | Programs | Oracle Installation Products | Universal Installer

6. Run the Registry Editor and delete the following ORACLE folders if they exist.

a. Start | Run, type REGEDIT i. HKEY_CURRENT_USER\SOFTWARE\ORACLE ii. HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE

If using 32-bit Oracle software on a 64-bit OS, additionally check the following location:

iii. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE

Often, you will not find an Oracle folder under HKEY_CURRENT_USER. But, you should always find an Oracle folder under HKEY_LOCAL_MACHINE.

7. Use the Registry Editor to delete all existing ORACLE services.

a. Windows 95/98 i. Windows 95 and 98 cannot run services and should not have any Oracle service entries in the registry

b. Windows NT/2000/XP/2003/Vista/2008/7 i. Start | Run, type REGEDIT 1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services 2. HKEY_LOCAL_MACHINE\SYSTEM\ControlSet00X\Services There are typically two control sets, ControlSet001 and ControlSet002. But, your environment may be different. Therefore, check all of your control sets, signified by the X, that exist in your registry.

c. Delete any folders in the above locations with the name OracleXXX.

8. Use the Windows Explorer to delete all folders on your hard drive that contain Oracle Client Software.

a. Common folder names to look for...

i.   App\[OS Username]\Product ii. Oracle\Product iii. Oracle iv. OraNT v.   OraWin95 vi. OraWin

b. If you are unable to delete an Oracle folder because the operating system has a lock on a particular file in the Oracle folder, please try each of the following actions in the order they are listed attempting to delete the Oracle folder after each one. At some point you will be able to delete the locked file and the rest of the Oracle software:

i.   Close all running applications, even ones you do not think interact with Oracle, and try again.

ii. Make sure any services stopped in step 4 are still stopped (occasionally services such as the MSDTC or IIS Admin will                 automatically restart themselves) and try again.

iii. Open a Command Prompt and execute the following command:

C:\> tasklist -m [dll_name].dll

See if it lists any executables that have a lock on the specified dll. If so, either gracefully or ungracefully (via Task Manager, Process Explorer, etc) terminate these processes and finish removing the Oracle folder.

iv. Use the Registry Editor to rename Microsoft Keys that may be                 be pointing to Oracle DLLs it may have locked.

Open the Registry Editor

Start | Run, type REGEDIT and go to the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI

OracleOciLib = oci.dll OracleSqlLib = orasql.dll OracleXaLib = oraclient.dll

Add an "X" to the end of the names of all three DLLs

OracleOciLib = oci.dllX OracleSqlLib = orasql.dllX OracleXaLib = oraclient.dllX

Reboot your computer and attempt to finish deleting the Oracle folder.

NOTE: Be sure to change these settings back before reinstalling Oracle Software. For more information on what these settings do                 you can review Note 1292622.1.

v.   Should there still be a problem, please contact Oracle Support.

9. If removing Oracle Client Software Version 8.1.x or later, please locate and delete the following additional Oracle folder:

a. C:\Program Files\Oracle

If using 32-bit Oracle software on a 64-bit OS, additionally locate and delete the following 32-bit Oracle folder:

b. C:\Program Files (x86)\Oracle

10. Check the Start | Programs menu and look for any remaining Oracle folders. If any exist, remove them in the following manner:

a. Open the Windows Explorer check the following locations:

i.   Windows 95/98 C:\WINDOWS\Start Menu\Programs

ii. Windows NT                   C:\WINNT\Profiles\All Users\Start Menu\Programs

iii. Windows 2000/XP/2003 C:\Documents and Settings\All Users\Start Menu\Programs

iv. Windows Vista/2008/7 C:\ProgramData\Microsoft\Windows\Start Menu\Programs

b. Delete any remaining Oracle folders listed here

11. Check your PATH and CLASSPATH environment variables and remove any part that still references Oracle.

a. Windows 95/98 i.   Start | Run, type SYSEDIT. The System Configuration Editor will open and display the AUTOEXEC.BAT file.

Windows NT           ii. Go to the desktop and right-click My Computer. Choose Properties and click the Environment tab.

Windows 2000 iii. Go to the desktop and right-click My Computer. Choose Properties and click the Advanced tab. Click the Environment Variables button.

Windows XP/2003/Vista/2008/7 iv. Start | Control Panel. Open the System control panel. Choose the Advanced tab and then click the Environment Variables button.

OR

Start | Control Panel | System and Maintenance | System | Advanced System Settings link. Click the Environment Variables button.

b. Look for the variables PATH and CLASSPATH. Remove any part that references Oracle.

12. Check for the existence of the following environment variables:

ORACLE_HOME TNS_ADMIN

Open a DOS/Command Prompt, type the following and press Enter:

C:\> SET

This will list all environment variables. If any of the ones listed above are found, locate them via the same procedure described in step 11, highlight each one and then click the "Delete" button in the Environment Variables window to permanently remove them.

In general, ORACLE_HOME is not needed on a Windows platform and TNS_ADMIN should only be created when you are referencing TNSNAMES.ORA and SQLNET.ORA files that need to be located outside the typical location [ORACLE_HOME]\Network\Admin

of your Oracle Home. It also is not typically needed on a Windows platform.

13. If using ODBC, open the ODBC Administrator choose the Drivers tab and see if there are any occurrences of the following Oracle ODBC drivers:

i.   Oracle in [Home_Name]  (i.e. Oracle in OraHome92) ii. Oracle ODBC Driver iii. Oracle73 Ver 2.5 driver

If using 32-bit Oracle software on a 64-bit OS, additionally check the 32-bit ODBC Administrator located here:

C:\WINDOWS\SysWOW64\odbcad32.exe

NOTE: For more information see Note 308645.1.

If you are not using ODBC, skip this step.

a. You may notice that under the Drivers tab the version of the Oracle ODBC driver is listed as "Not Marked". If this is the case, please follow Note 170676.1 which is referenced in the "Related Documents" section at the end of this article before continuing these steps.

NOTE: You will only need to follow step 3 in Note 170676.1.

14. Empty the Recycle Bin and reboot your computer. You are now ready to   install new Oracle software.

a. NOTE:  If you are using Windows NT/2000/XP with an NTFS file system, before installing Oracle software make sure you have logged into the Windows operating system as a user with Administrator privileges.

15. Now that you have removed your previous Oracle software, if you are planning on installing any of the following versions

o Oracle9i Release 2 (9.2.0.1.0) o Oracle10g Release 1 (10.1.0.2.0)

please see note

Note 215255.1 - Unable to Connect to Database with Oracle Client Software for Windows

to make sure you do not run into a known permissions issue.

RELATED DOCUMENTS -

This note describes how to manually remove Data Source Names (DSNs) and ODBC Drivers from the Windows Registry

Note 170676.1 - How to Remove System, User, File DSNs and ODBC Drivers from the Windows Registry

This note describes how the Microsoft MTXOCI registry settings are related to Oracle

Note 1292622.1 - Hang During OS Boot Up As MTXOCI.DLL Calls Oracle Client DLL

This note describes how to remove an Oracle Database and/or Oracle Web Server software from your computer.

Note 124353.1 - WIN: Manually Removing all Oracle Components on Microsoft Windows Platforms

ADDITIONAL SEARCH WORDS --- UNINSTALL UN-INSTALL DEINSTALL DE-INSTALL RIPOUT RIP OUT RIP-O References NOTE:1292622.1 - Hang During OS Boot Up As MTXOCI.DLL Calls Oracle Client DLL NOTE:170676.1 - Remove System, User, File DSNs & ODBC Drivers from the Windows Registry NOTE:215255.1 - Unable to Connect to Database with Oracle Client Software for Windows NOTE:308645.1 - 32-Bit ODBC Driver Not Listed in 64-Bit Microsoft ODBC Administrator

Related Products

•Oracle Database Products > Oracle Database > Oracle Database > Oracle Installation Procedures •Oracle Database Products > Oracle Database > Oracle Database > Oracle Universal Installer

Keywords

DE-INSTALL; DEINSTALL; UNINSTALL