7 Removing Oracle Real Application Clusters Software

If necessary, you can completely remove all Oracle databases, instances, and software from an Oracle Real Application Clusters (Oracle RAC) Oracle home directory.

See Also:

The product-specific documentation, for example Oracle Database Client Installation Guide for Microsoft Windows, for information on removing a single product. Review the requirements and restrictions that apply for that product.

7.1 Overview of Deinstallation Procedures

There are several tasks to perform when completely removing all Oracle databases, instances, and software from an Oracle home directory.

  • Identify all instances associated with the Oracle home

  • Shut down processes

  • Remove listeners installed in the Oracle Database home

  • Remove database instances

  • Remove Oracle Automatic Storage Management (Oracle ASM) release 11.1 or earlier

  • Remove Oracle Clusterware and Oracle ASM (Oracle Grid Infrastructure)

Note:

  • For information on removing Oracle Database Vault, see Oracle Database Vault Administrator's Guide.

  • For information on removing Oracle Configuration Manager, see Oracle Configuration Manager Installation and Administration Guide.

  • With Oracle Grid Infrastructure 11g release 2 (11.2) and later, Oracle ASM and Oracle Clusterware comprise the Oracle Grid Infrastructure installation. These components are installed and removed together.

Caution:

If any cluster member node has more than one database with the same global database name (GDN) on a server, then you cannot use the deinstallation tool to remove only one database.

For example, if you have a standalone database on one of your cluster nodes with the GDN mydb.example.com, and your Oracle RAC database GDN is also mydb.example.com, then both databases on that node are removed by the deinstallation tool.

7.2 Identifying All Instances On a Cluster

You can identify the database instances on your cluster using either SRVCTL or the Windows Services control interface.

7.2.1 Identifying All Instances On a Cluster Using SRVCTL

You can use SRVCTL to identify all database instances associated with an Oracle home.

  • Enter the following command, where dbname is the name of the database:
    C:\..> srvctl status database -db dbname
    

7.2.2 Identifying All Instances On a Cluster Using the Windows Services Control Manager

You can use Windows Services Control Manager to identify all database instances and services associated with an Oracle home.

  1. Log in to a cluster node as a user with Administrator privileges.
  2. Use the Windows Services Control Manager to locate the Oracle services related to the Oracle home.
    Look for any Oracle services (their names begin with Ora) that access the Oracle home you are removing and have the status Started.

    To determine which Oracle home a service is associated with, check "Path to Executable" for a service to see the directory where the executable for the service is located.

7.3 Removing Oracle RAC Software

The deinstallation tool removes Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM) from your server, and Oracle Database installations, for both Oracle RAC and single-instance databases.

7.3.1 About the Deinstallation Tool

The deinstallation tool stops Oracle software, and removes Oracle software and configuration files on the operating system.

Starting with Oracle Database 12c, the deinstallation tool is integrated with the database installation media. You can run the deinstallation tool using the setup.exe command with the -deinstall and -home options from the base directory of the Oracle Database or Oracle Database Client installation media.

The deinstallation tool is also available as a separate command (deinstall.bat) in Oracle home directories after installation. It is located in the %ORACLE_HOME%\deinstall directory.

The deinstallation tool stops Oracle software, and removes Oracle software and configuration files on the operating system for a specific Oracle home. If you run the deinstallation tool to remove an Oracle Grid Infrastructure for Windows installation, then the deinstaller automatically runs the appropriate scripts to deconfigure Oracle Grid Infrastructure or Oracle Grid Infrastructure for standalone server.

The deinstallation tool uses the information you provide, plus information gathered from the software home to create a response file. You can alternatively supply a response file generated previously by the deinstall.bat command using the -checkonly option and -o option. You can also edit a response file template to create a response file.

Note:

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 Oracle Database 12.1 installation media to remove Oracle software from an existing 11.2.0.4 Oracle home.

If the software in the Oracle home is not running (for example, after an unsuccessful installation), then the deinstallation tool cannot determine the configuration and you must provide all the configuration details either interactively or in a response file.

7.3.2 Deinstallation Tool Command Reference

You can use the deinstallation tool to remove Oracle software. You can run this command in standalone mode, from an Oracle home directory, or through the installer.

Purpose

The deinstallation tool stops Oracle software, and removes Oracle software and configuration files on the operating system.

File Path

%ORACLE_HOME%\deinstall\deinstall

Prerequisites

Before you run the deinstallation tool for Oracle Grid Infrastructure installations:

  • Dismount Oracle Automatic Storage Management Cluster File System (Oracle ACFS) and disable Oracle Automatic Storage Management Dynamic Volume Manager (Oracle ADVM).

  • If Grid Naming Service (GNS) is in use, then notify your DNS administrator to delete the subdomain entry from the DNS.

Syntax When Using the deinstall.bat Program

deinstall.bat [-silent] [-checkonly] [-local] 
 [-paramfile complete path of input response file] 
 [-params name1=value [name2=value . . .]] 
 [-o complete path of directory for saving files] 
 [-tmpdir complete path of temporary directory to use]
 [-logdir complete path of log directory to use] [-help]

Syntax When Using the setup.exe Program

setup.exe -deinstall -home complete path of Oracle home[-silent] [-checkonly] 
 [-local] [-paramfile complete path of input response file] 
 [-params name1=value [name2=value . . .]] 
 [-o complete path of directory for saving files] 
 [-tmpdir complete path of temporary directory to use]
 [-logdir complete path of log directory to use] [-help]

Options

Table 7-1 Options for the Deinstallation Tool

Command Option Description
home complete path of Oracle home

Specify this option to indicate the home path of the Oracle home to check or deinstall. To deinstall Oracle software using the deinstall.bat command located within the Oracle home being removed, provide a response file in a location outside the Oracle home, and do not use the -home option.

If you run deinstall.bat from the %ORACLE_HOME%\deinstall path, then the -home option is not required because the tool knows from which home it is being run. If you use the command setup.exe -deinstall from the installation media, then the -home option is mandatory.

silent Specify this option to run the deinstallation tool in noninteractive mode. This option requires one of the following:
  • A working system that it can access to determine the installation and configuration information; the -silent option does not work with failed installations.

  • A response file that contains the configuration values for the Oracle home that is being deinstalled or deconfigured.

checkonly

Specify this option to check the status of the Oracle software home configuration. Running the deinstall command with the -checkonly option does not remove the Oracle configuration. This option generates a response file that you can use with the deinstall.bat command.

When you use the -checkonly option to generate a response file, you are prompted to provide information about your system. You can accept the default value the tool has obtained from your Oracle installation, indicated inside brackets ([]), or you can provide different values. To accept the defaults, press Enter at each prompt.

local

Specify this option on a multinode environment to deconfigure Oracle software in a cluster.

When you run deinstall.bat with this option, it deconfigures and deinstalls the Oracle software only on the local node (the node on which you run deinstall.bat) for non-shared Oracle home directories. The deinstallation tool does not deinstall or deconfigure Oracle software on remote nodes.

paramfile complete path of input response file

(Optional) You can specify this option to run deinstall.bat with a response file in a location other than the default. When you use this option, provide the complete path where the response file is located. If you run the deinstall.bat command from the Oracle home that you plan to deinstall, then you do not need to specify the -paramfile option.

The default location of the response file depends on the location of the deinstallation tool:

  • From the installation media or stage location: X:\staging_location\deinstall\response

  • After installation, from the installed Oracle home: %ORACLE_HOME%\deinstall\response.

params name1=value[ name2=value name3=value...] Use this option with a response file to override one or more values in a response file that you created.
o complete path of directory for saving response files

Use this option to provide a path other than the default location where the response file (deinstall.rsp.tmpl) is saved.

The default location of the response file depends on the invocation method of the deinstallation tool:

  • From the installation media or stage location: stagelocation\response

  • After installation, from the installed Oracle home: %ORACLE_HOME%\deinstall\response.

tmpdir complete path of temporary directory to use Specifies a non-default location where the deinstallation tool writes the temporary files for the deinstallation.
logdir complete path of log directory to use Specifies a non-default location where the deinstallation tool writes the log files for the deinstallation.
help Use the -help option to obtain additional information about the deinstallation tool options.

Location of Log Files for the Deinstallation Tool

If you use the deinstall.bat command located in an Oracle home, then the deinstallation tool writes log files in the C:\Program Files\Oracle\Inventory\logs directory.

If you are using the deinstall.bat command to remove the last Oracle home installed on the server, then the log files are written to the current user’s home directory. For example, if you are logged in as the domain user RACDBA\dba1, then the log files are stored in the directory C:\Users\dba1.RACDBA\logs.

7.3.3 Using the Deinstallation Tool to Remove Oracle RAC

You can run the deinstallation tool in multiple ways.

7.3.3.1 Running the Deinstallation Tool From an Oracle Home

You can run the deinstallation tool from an Oracle home or from the software installation media.

  1. The default method for running the deinstallation tool is from the deinstall directory in the Oracle home as the Oracle Installation user:
    C:\> %ORACLE_HOME%\deinstall\deinstall.bat
  2. Provide information about your servers as prompted or accept the defaults.
The deinstallation tool stops Oracle software, and removes Oracle software and configuration files on the operating system.

Example 7-1 Running deinstall.bat From Within the Oracle Home

The most common method of running the deinstallation tool is to use the version installed in the Oracle home being removed. The deinstallation tool determines the software configuration for the local Oracle home, and then provides default values at each prompt. You can either accept the default value, or override it with a different value. If the software in the Oracle home is not running (for example, after an unsuccessful installation), then the deinstallation tool cannot determine the configuration, and you must provide all the configuration details either interactively or in a response file. To use the deinstallation tool located in the current Oracle home directory, issue the following commands while logged in as a member of the Administrators group:

C:\> app\oracle\product\12.1.0\dbhome_1\deinstall\deinstall.bat

Provide additional information as prompted.

Note:

When using the deinstallation tool from a location other than within the Oracle home being removed, you must specify the -home option on the command line.

7.3.3.2 Running the Deinstallation Tool Interactively From the Installer

You can run the deinstallation tool from an Oracle home or from the software installation media.

  1. Use the setup.exe command with the -deinstall option, followed by the -home option to specify the path of the Oracle home you want to remove
  2. Provide information about your servers as prompted or accept the defaults.
The deinstallation tool stops Oracle software, and removes Oracle software and configuration files on the operating system.

Example 7-2 Running the Deinstallation Tool from the Software Installation Media

If you run the deinstallation tool from the installer in the installation media, then when the deinstall.bat command runs, it uses the information you provide to determine the system configuration and then provides default values at each prompt. You can either accept the default value, or override it with a different value. If the software in the specified Oracle home is not running (for example, after an unsuccessful install attempt), then the deinstallation tool cannot determine the configuration, and you must provide all the configuration details either interactively or in a response file.

For example, to remove the Oracle Database home dbhome_1 using the deinstallation tool started from the installer, use commands similar to the following while logged in as a member of the Administrator group, where directory_path is the path to the database directory on the installation media:

C:\> cd directory_path 
C:\..database> setup.exe -deinstall -home C:\app\oracle\product\12.1.0\db_home1\

Provide additional information as prompted.

Note:

When using the deinstallation tool from a location other than within the Oracle home being removed, you must specify the -home option on the command line.

7.3.3.3 Running the Deinstallation Tool with a Response File

The deinstallation tool uses the information you provide, plus information gathered from the software home to create a response file. You can alternatively supply a response file generated previously by the deinstall.bat command using the –checkonly option and -o option. You can also edit a response file template to create a response file.

  • To run the setup.exe command located in the path /directory_path, where directory_path is the path to the database directory on the installation media, and use a response file in the software owner location C:\user\oracle, enter the following commands while logged in as a member of the Administrators group:
    C:\> cd directory_path\
    C:\..database> setup.exe -deinstall -paramfile C:\user\oracle\my_db_parmfile.tmpl
    

7.3.3.4 Generating a Response File For Use With the Deinstallation Tool

You can generate the a response file by running the deinstall.bat command with the -checkonly and -o options before you run the command to deinstall the Oracle home, or you can use the response file template and manually edit it to create the response file.

Alternatively, you can use the response file template located at %ORACLE_HOME%\deinstall\response\deinstall.rsp.tmpl.
  • To generate the response file deinstall_dbhome_1.rsp using the deinstall.bat command located in the Oracle home and the -checkonly option, enter a command similar to the following, where C:\app\oracle\product\12.1.0\dbhome_1 is the location of the Oracle home and C:\Users\oracle is the directory in which the generated response file is created:
    C:\> app\oracle\product\12.1.0\dbhome_1\deinstall\deinstall.bat -checkonly -o C:\Users\oracle\
    

7.3.4 Example Response File for Deinstall of Oracle RAC

You can run the deinstallation tool on Oracle RAC Databases with the -paramfile option to use the values you specify in the response file. The following is an example of a response file used with the deinstallation tool.

Example 7-3 Sample Response File to use with the Deinstallation Tool to Uninstall Oracle RAC

The following is an example of a response file created by the deinstallation tool. The response file contains the following information:

  • The Oracle Home User is oracle

  • The Oracle Database home (Oracle home) is in the path C:\app\oracle\product\12.1.0\dbhome_1

  • The Oracle base is C:\app\oracle

  • The Oracle base is C:\app\oracle

  • The Oracle base is C:\app\oracle

  • The central Oracle Inventory home is C:\Program Files\Oracle\Inventory

  • The virtual IP address (VIP) is 192.0.2.1

  • The name of the local node (the node on which you run the deinstallation tool) is node1

  • The name of the remote node is node2

  • The database name is orcl and it is an Oracle RAC database

  • The database uses Oracle ASM for storage

#Copyright (c) 2005, 2010 Oracle Corporation. All rights reserved.
LOCAL_NODE=node1
HOME_TYPE=RACDB
ORACLE_BASE=C:\app\oracle
DB_TYPE.orcl=RAC_DB
silent=false
ORA_CRS_HOME=C:\app\12.1.0\grid\
LOGDIR=C:\Program Files\Oracle\Inventory\logs\
DATAFILE_LOC.orcl=
ORACLE_BINARY_OK=true
DUMP_DESTINATION_LOC.orcl=C:\app\oracle\admin\orcl
EMCP.DB_UNIQUE_NAME_LIST=orcl
CLUSTER_NODES=node1,node2
REMOTE_NODES=node2
SPFILE_LOC.orcl=+DATA/orcl/spfileorcl.ora
ARCHIVE_LOG_DESTINATION_LOC.orcl=
ORACLE_BASE.orcl=C:\app\oracle
LOCAL_SID.orcl=orcl1
local=false
INVENTORY_LOCATION=C:\Program Files\Oracle\Inventory
NODE_LIST.orcl=node1,node2
RAW_MAPPING_FILE.orcl=
DIAG_DEST.orcl=C:\APP\ORACLE\diag\rdbms\orcl
ORACLE_HOME=C:\app\oracle\product\12.1.0\dbhome_1\
STORAGE_TYPE.orcl=ASM
CCR_CONFIG_STATUS=CCR_DEL_HOME
CRS_HOME=false
EMCP.CHECK_POINT.orcl=WINDOWS_SERVICE_REGISTRY_CREATE,DBCONTROL_START
CONFIGFILE_LOC.orcl=+DATA/orcl/controlfile/current.260.712754807,C:\APP\ORACLE
 \PRODUCT\12.1.0\DBHOME_1\DATABASE\DR1ORCL.DAT,C:\APP\ORACLE\PRODUCT\12.1.0\
 DBHOME_1\DATABASE\DR2ORCL.DAT
SID_LIST.orcl=orcl1,orcl2
OLD_ACTIVE_ORACLE_HOME=
CREATION_MODE.orcl=y
COMPS_TO_REMOVE=ode.net.ntoledb,oramts
DB_UNIQUE_NAME_LIST=orcl
FLASH_RECOVERY_LOC.orcl=

7.4 Cleaning Up After a Failed Installation

If an installation fails, then you must remove the Oracle home directory and remove all files that Oracle Universal Installer (OUI) created during the attempted installation.

  1. Follow the instructions in Removing Oracle Real Application Clusters Software to run OUI to deinstall Oracle RAC.
  2. Manually remove the directory that was used as the Oracle home directory during the installation.
  3. Remove the following Windows Registry keys created by OUI during the previous installation attempt:
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Oracle12\Performance
     \KEY_ORACLE_HOME_NAME
    

After you have completed these steps, you can start the installation again.