How to uninstall / completely remove Oracle 11g (client)?
How to uninstall / completely remove Oracle 11g (client)?
deinstall.bat doesn't work.
Edit: Further discussion related to why this question was closed and deleted: https://meta.stackexchange.com/questions/190441/why-was-this-question-related-to-uninstalling-the-oracle-database-client-deleted
Solution 1:
Assuming a Windows installation, do please refer to this:
http://www.oracle-base.com/articles/misc/ManualOracleUninstall.php
- Uninstall all Oracle components using the Oracle Universal Installer (OUI).
- Run regedit.exe and delete the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE key. This contains registry entires for all Oracle products.
- Delete any references to Oracle services left behind in the following part of the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ora*
It should be pretty obvious which ones relate to Oracle.- Reboot your machine.
- Delete the "C:\Oracle" directory, or whatever directory is your ORACLE_BASE.
- Delete the "C:\Program Files\Oracle" directory.
- Empty the contents of your "C:\temp" directory.
- Empty your recycle bin.
Calling additional attention to some great comments that were left here:
- Be careful when following anything listed here (above or below), as doing so may remove or damage any other Oracle-installed products.
- For 64-bit Windows (x64), you need also to delete the
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE
key from the registry. - Clean-up by removing any related shortcuts that were installed to the Start Menu.
- Clean-up environment variables:
- Consider removing
%ORACLE_HOME%
. - Remove any paths no longer needed from
%PATH%
.
- Consider removing
This set of instructions happens to match an almost identical process that I had reverse-engineered myself over the years after a few messed-up Oracle installs, and has almost always met the need.
Note that even if the OUI is no longer available or doesn't work, simply following the remaining steps should still be sufficient.
(Revision #7 reverted as to not misquote the original source, and to not remove credit to the other comments that contributed to the answer. Further edits are appreciated (and then please remove this comment), if a way can be found to maintain these considerations.)
Solution 2:
There are some more actions you should consider:
-
Remove Registry Entries for MS Distributed Transaction Coordinator (MSDTC)
Note: on the Internet I found this step only at a single (private) page. I don't know if it is required/working or if it breaks anything on your PC.
- Open Regedit
- Navigate to
HKEY_LOCAL_MACHINE\Software\Microsoft\MSDTC\MTxOCI
- Add an x before each string for
OracleOciLib
,OracleSqlLib
, andOracleXaLib
- Navigate to
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\MSDTC\MTxOCI
- Add an x before each string for
OracleOciLib
,OracleSqlLib
, andOracleXaLib
Otherwise these files, if they exist, will still be in use next time you reboot, and unable to be deleted.
-
Remove environment variable
ORACLE_HOME
,ORACLE_BASE
,TNS_ADMIN
,NLS_LANG
if existCheck also Oracle doc to find all Oracle related environment variables, however apart from variables listed above they are very rarely used on Windows Client: Oracle Environment Variables
-
Unregister oci.dll
- Open a command line window (Start Menu -> Run... -> cmd)
Enter
regsvr32 /u oci.dll
, resp.%windir%\SysWOW64\regsvr32 /u oci.dll
In some cases the file
%ORACLE_HOME%\bin\oci.dll
is locked and you cannot delete it. In such case rename the file (e.g. to oci.dll.x) and reboot the PC, afterwards you can delete it.
-
Remove Oracle .NET assemblies from Global Assembly Cache (GAC). You do this typically with the gacutil utility, if available on your system. Would be like this:
gacutil /u Policy.10.1.Oracle.DataAccess gacutil /u Policy.10.2.Oracle.DataAccess gacutil /u Policy.1.102.Oracle.DataAccess gacutil /u Policy.1.111.Oracle.DataAccess gacutil /u Policy.2.102.Oracle.DataAccess gacutil /u Policy.2.111.Oracle.DataAccess gacutil /u Policy.2.112.Oracle.DataAccess gacutil /u Policy.2.121.Oracle.DataAccess gacutil /u Policy.2.122.Oracle.DataAccess gacutil /u Policy.4.112.Oracle.DataAccess gacutil /u Policy.4.121.Oracle.DataAccess gacutil /u Policy.4.122.Oracle.DataAccess gacutil /u Oracle.DataAccess gacutil /u Oracle.DataAccess.resources gacutil /u Policy.4.121.Oracle.ManagedDataAccess gacutil /u Policy.4.122.Oracle.ManagedDataAccess gacutil /u Oracle.ManagedDataAccess gacutil /u Oracle.ManagedDataAccess.resources gacutil /u Oracle.ManagedDataAccessDTC gacutil /u Oracle.ManagedDataAccessIOP gacutil /u Oracle.ManagedDataAccess.EntityFramework
Entry
System.Data.OracleClient
should not be removed, this one is installed by Microsoft - not an Oracle component!Instead of
gacutil /u ...
you can also useOraProvCfg /action:ungac /providerpath:...
if OraProvCfg is still available on your system. You may find it at%ORACLE_HOME%\odp.net\managed\x64\OraProvCfg.exe
.
-
With a text editor, open XML Config file
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
and delete branch<oracle.manageddataaccess.client>
, if existing.-
Do the same with:
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config %SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config %SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\Config\web.config %SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\Config\web.config
Instead of editing the XML Config file manually you can also run (if OraProvCfg.exe is still available on your system):
%ORACLE_HOME%\odp.net\managed\x64\OraProvCfg.exe /action:unconfig /product:odpm /frameworkversion:v4.0.30319 %ORACLE_HOME%\odp.net\managed\x86\OraProvCfg.exe /action:unconfig /product:odpm /frameworkversion:v4.0.30319 %ORACLE_HOME%\odp.net\managed\x64\OraProvCfg.exe /action:unconfig /product:odp /frameworkversion:v4.0.30319 %ORACLE_HOME%\odp.net\managed\x86\OraProvCfg.exe /action:unconfig /product:odp /frameworkversion:v4.0.30319
-
-
Check following Registry Keys and delete them if existing
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess.EntityFramework6 HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.DataAccess.EntityFramework6\ HKLM\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess.EntityFramework6 HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.DataAccess.EntityFramework6\ HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Data Provider for .NET, Managed Driver HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Data Provider for .NET, Unmanaged Driver HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Provider for OLE DB
Delete the Inventory folder, typically
C:\Program Files\Oracle\Inventory
andC:\Program Files (x86)\Oracle\Inventory
Delete temp folders
%TEMP%\deinstall\
,%TEMP%\OraInstall\
and%TEMP%\CVU*
(e.g%TEMP%\CVU_11.1.0.2.0_domscheit
) if existing.