5 Removing Oracle Database Client Software
This chapter describes how to completely remove Oracle software and configuration files related to the specified Oracle home using the Deinstallation Tool.
The deinstall command removes the Oracle Database Client installations.
Starting with Oracle Database 11 g Release 2 (11.2), Oracle recommends that you use the deinstallation tool to remove the entire Oracle home associated with the Oracle Database, Oracle Clusterware, Oracle ASM, Oracle RAC, or Oracle Database client installation. Oracle does not support the removal of individual products or components.
It includes information about the following topics:
5.1 About the Deinstallation Tool
The Deinstallation Tool ( deinstall ) is available in the installation media before installation, and is available in Oracle home directories after installation. It is located in the $ORACLE_HOME/deinstall directory.
The deinstall command uses the information you provide, plus information gathered from the software home to create a parameter file. You can alternatively supply a parameter file generated previously by the deinstall command using the –checkonly option, or by editing the response file template.
Oracle strongly recommends that you configure your installations using an Optimal Flexible Architecture (OFA) configuration, and that you reserve Oracle base and Oracle home paths for exclusive use of Oracle software. If you have any user data in these locations in the Oracle base that is owned by the user account that owns the Oracle software, then the deinstall command deletes this data.
The deinstallation tool deletes Oracle Database configuration files, user data, and fast recovery area (FRA) files even if they are located outside of the Oracle base directory path.
The command uses the following syntax, where variable content is indicated in italics:
Oracle recommends that you run the deinstallation tool as the Oracle software installation owner. The default method for running the deinstall tool is from the deinstall directory in the Oracle home as the installation owner:
Provide information about your servers as prompted or accept the defaults.
The deinstall command stops Oracle software, and removes Oracle software and configuration files on the operating system.
You must run the deinstallation tool from the same release to remove Oracle software. Do not run the deinstallation tool from a later release to remove Oracle software from an earlier release. For example, do not run the deinstallation tool from the 12.1.0.1 installation media to remove Oracle software from an existing 11.2.0.4 Oracle home.
In addition, you can run the deinstall tool from other locations, or with a parameter file, or select other options to run the tool.
The options are:
Use this flag to indicate the home path of the Oracle home to check or deinstall. To deinstall Oracle software using the deinstall command in the Oracle home you plan to deinstall, provide a parameter file in another location, and do not use the -home flag.
If you run deinstall from the $ORACLE_HOME/deinstall path, then the -home flag is not required because the tool knows from which home it is being run. If you use the standalone version of the tool, then -home is mandatory.
Use this flag to run the command in silent or response file mode. If you use the -silent flag, then you must use the -paramfile flag, and provide a parameter file that contains the configuration values for the Oracle home to deinstall or deconfigure.
You can generate a parameter file to use or modify by running deinstall with the -checkonly flag. The deinstall command then discovers information from the Oracle home to deinstall and deconfigure. It generates the properties file, which you can then use with the -silent option.
You can also modify the template file deinstall.rsp.tmpl , located in the $ORACLE_HOME/deinstall/response folder.
Use this flag to check the status of the Oracle software home configuration. Running the command with the -checkonly flag does not remove the Oracle configuration. The -checkonly flag generates a parameter file which you can then use with the deinstall command and -silent option.
Use this flag on a multinode environment to deinstall Oracle software in a cluster.
When you run deinstall with this flag, it deconfigures and deinstalls the Oracle software on the local node (the node where deinstall is run). On remote nodes, it deconfigures Oracle software, but does not deinstall the Oracle software.
-paramfile complete path of input parameter property file
Use this flag to run deinstall with a parameter file in a location other than the default. When you use this flag, provide the complete path where the parameter file is located.
The default location of the parameter file depends on the location of deinstall :
From the installation media or stage location: $ORACLE_HOME/inventory/response .
From a unzipped archive file from OTN: / ziplocation /response .
After installation from the installed Oracle home: $ORACLE_HOME/deinstall/response .
-params [ name1 = value name 2 = value name3 = value . . .]
Use this flag with a parameter file to override one or more values to change in a parameter file you have already created.
-o complete path of directory for saving response files
Use this flag to provide a path other than the default location where the properties file ( deinstall.rsp.tmpl ) is saved.
The default location of the parameter file depends on the location of deinstall :
From the installation media or stage location before installation: $ORACLE_HOME/
From a unzipped archive file from OTN: / ziplocation /response/ .
After installation from the installed Oracle home: $ORACLE_HOME/deinstall/response .
-tmpdir complete path of temporary directory
Use this flag to specify a non-default location where Oracle Deinstallation Tool writes the temporary files for the deinstallation.
-logdir complete path of temporary directory
Use this flag to specify a non-default location where Oracle Deinstallation Tool writes the log files for the deinstallation.
Use the help option ( -help ) to obtain additional information about the command option flags.
5.2 Downloading the Deinstall Tool for Use with Failed Installations
If you require the Deinstallation Tool (deinstall) to remove failed or incomplete installations, then it is available as a separate download from the Oracle Technology Network (OTN) website.
To download the Deinstallation Tool:
Go to the following URL:
Under Oracle Database 11g Release 2 , click See All for the respective platform for which you want to download the Deinstallation Tool.
The Deinstallation Tool is available for download at the end of this web page.
5.3 Example of Running the Deinstall Command
As the deinstall command runs, you are prompted to provide the home directory of the Oracle software to remove from your system. Provide additional information as prompted.
Use the optional flag -paramfile to provide a path to a parameter file.
In the following example, the deinstall command is in the path /u01/app/oracle/product/11.2.0/client_1/deinstall , and it uses a parameter file in the software owner location /home/usr/oracle :
If you enter the deinstall command outside of the $ORACLE_HOME/deinstall folder, then help is displayed, unless you enter a -home flag and provide a path. If you run the deinstall command from the $ORACLE_HOME/deinstall folder, then deinstallation starts without prompting you for a home address.
5.4 Deinstallation Parameter File Example
You can run the deinstall command with the -paramfile option to use the values you specify in the parameter file. The following is an example of a parameter file, in which the Oracle Database binary owner is oracle , the Oracle Database home (Oracle home) is in the path /u01/app/oracle/product/11.2.0/client_1/ , the Oracle base (where other Oracle software is installed) is /u01/app/oracle/ , the central Oracle Inventory home ( oraInventory ) is /u01/app/oraInventory , and the client is client1 :
Manual Oracle Uninstall
A number of people have contacted me regarding problems uninstalling Oracle products. The two methods listed below should only be used as a last resort and will remove *all* Oracle software allowing a re-install. If you make any mistakes they can be quite destructive so be careful.
Windows
In the past I’ve had many problems uninstalling all Oracle products from Windows systems. Here’s my last resort method:
- 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.
- If you are running 64-bit Windows, you should also delete the HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Oracle key if it exists.
- 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.
- If you are running 64-bit Wiindows, you should also delete the » C:\Program Files (x86)\Oracle » directory.
- Remove any Oracle-related subdirectories from the «C:\ProgramData\Microsoft\Windows\Start Menu\Programs\» directory.
- Empty the contents of your » C:\temp » directory.
- Empty your recycle bin.
At this point your machine will be as clean of Oracle components as it can be without a complete OS reinstall.
Remember, manually editing your registry can be very destructive and force an OS reinstall so only do it as a last resort.
If some DLLs can’t be deleted, try renaming them, the after a reboot delete them.
Uninstalling all products from UNIX is a lot more consistent. If you do need to resort to a manual uninstall you should do something like:
-
Uninstall all Oracle components using the Oracle Universal Installer (OUI).
Stop any outstanding processes using the appropriate utilities.
Delete the files and directories below the $ORACLE_HOME.
With the exception of the product directory, delete directories below the $ORACLE_BASE.
Delete the «/etc/oratab» file. If using 9iAS delete the «/etc/emtab» file also.
How to uninstall / completely remove Oracle 11g (client)? [closed]
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago .
How to uninstall / completely remove Oracle 11g (client)?
deinstall.bat doesn’t work.
4 Answers 4
Assuming a Windows installation, do please refer to this:
- 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% .
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.)
Moin’s DBA Blog
Problems With Solutions . Hi, I am working as an On-call DBA in one of the Multi-Disciplinary 24/7 Hospital that features Speciality Centers Providing a wide range of comprehensive treatment options in Kingdom of Saudi Arabia.. You Can Contact me at : moinblog79@gmail.com
Database 11g
Saturday, March 26, 2016
How to Uninstall Oracle 11g Client on Windows
Hi guys i will show you how simple it is to Uninstall Oracle Client on Windows.
1. Go to Start menu, Programs, Oracle_Client11g_Home and Click it will take you to
Universal Installer Menu as shown below.