How to Remove the Oracle Client Software Before Reinstalling

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 standard 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:WINDOWSSysWOW64odbcad32.exe

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".

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, Policy.X.X.Oracle.Web

NOTE: All Oracle Providers for ASP.NET are contained in the Oracle.Web 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.

NOTE: If you are not sure if you have installed any of these components, open Windows Explorer
and check the location C:Windowsassembly.  Be sure the Assembly Name column is sorted
alphabetically and see if it contains any items that start with OracleXXX.  If so, then
you should follow these steps.

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 ALL of the assemblies in the GAC using the following command:

C:> gacutil /l

Scroll through ALL of the output and identify ODP.NET Publisher Policy 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.Y.Oracle.DataAccess

(where X and Y are the version numbers of the Publisher Policy file found)

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:

Oracle.VsDevTools
Oracle.Management.Omo

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:

Oracle.Database.Extensions

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:

Oracle.Web

If found, remove them using the following command:

C:> gacutil /u Oracle.Web

i.  Use the GACUTIL List command (see step d above) to look for the
presence of OPASP.NET Publisher Policy assemblies:

Policy.2.111.Oracle.Web

If found, remove EACH one using the following command:

C:> gacutil /u Policy.X.Y.Oracle.Web

(where X and Y are the version numbers of the Publisher Policy file found)

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:WindowsAssembly" 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.

NOTE: If manually attempting to remove Assemblies from the GAC and you receive
the following error:

Assembly Cache Viewer - Uninstall failed

Access is denied: '(assembly name)'

This is a Windows permissions issue and should be addressed by Microsoft.

One workaround is to set a key in the Registry which will allow you to view the
GAC as actual files & folders which can be deleted.

Run the Registry Editor and add the key "DisableCacheViewer".

Start | Run, type REGEDIT

i.  HKEY_LOCAL_MACHINESOFTWAREMicrosoftFusion

ii.  Create the key "DisableCacheViewer" as a DWORD and set its value to 1

NOTE: Removing the key or setting its value to 0 will restore the default behavior.
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_USERSOFTWAREORACLE
ii.  HKEY_LOCAL_MACHINESOFTWAREORACLE

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

iii.  HKEY_LOCAL_MACHINESOFTWAREWow6432NodeORACLE

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_MACHINESYSTEMCurrentControlSetServices
2.  HKEY_LOCAL_MACHINESYSTEMControlSet00XServices

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.   OracleProduct
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_MACHINESOFTWAREMicrosoftMSDTCMTxOCI

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 FilesOracle

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:WINDOWSStart MenuPrograms

ii.   Windows NT
C:WINNTProfilesAll UsersStart MenuPrograms

iii.  Windows 2000/XP/2003
C:Documents and SettingsAll UsersStart MenuPrograms

iv.   Windows Vista/2008/7
C:ProgramDataMicrosoftWindowsStart MenuPrograms

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
ORACLE_SID
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]NetworkAdmin

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:WINDOWSSysWOW64odbcad32.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)

Comments are closed.