Skip Headers
Oracle® Database Installation Guide
11g Release 2 (11.2) for Microsoft Windows

Part Number E24186-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

7 Removing Oracle Database Software

This chapter describes how to completely remove Oracle software and configuration files related to the specified Oracle home

The deinstall tool removes standalone Oracle Database installations, Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM) from your server, as well as Oracle Real Application Clusters (Oracle RAC) and Oracle Database client installations.

Starting with Oracle Database 11g 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.

See Also:

Oracle Grid Infrastructure Installation Guide and Oracle Real Application Clusters Installation Guide for information about removing an Oracle RAC installation.

The "Dropping Disk Groups" section in the Oracle Database Storage Administrator's Guide for information about removing an Oracle Automatic Storage Management disk group.

The following sections describe the tool, and provide information about additional options to use the tool:

Caution:

If you have a standalone database on a node in a cluster and you have multiple databases with the same global database name (GDN), then you cannot use the deinstall tool to remove one database only.

7.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 ORACLE_HOME\deinstall.

The deinstall command uses the information you provide and the information gathered from the software home to create a parameter file. Alternatively, you can supply a parameter file generated previously by the deinstall command using the –checkonly option, or by editing the response file template.

Caution:

When you run the deinstall command, if the central inventory contains no other registered homes besides the home that you are deconfiguring and removing, then the Deinstallation tool removes the following files and directory contents in the Oracle base directory of the Oracle Database installation owner:
  • admin

  • cfgtoollogs

  • checkpoints

  • diag

  • oradata

  • flash_recovery_area

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 command uses the following syntax, where variable content is indicated by italics:

deinstall.bat -home complete path of Oracle home [-silent] [-checkonly] [-local]
[-cleanupOBase] [-paramfile complete path of input parameter property file] [-params name1=value name2=value . . .]
[-o complete path of directory for saving files] [-help]
 

The default method for running the deinstall tool is from the deinstall directory in the Oracle home as the installation owner:

%ORACLE_HOME%\deinstall
DRIVE_LETTER:\> deinstall

Provide information about your servers as prompted or accept the defaults.

The deinstall 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 a standalone server, then the deinstaller prompts you to run the roothas.pl script, to deconfigure Oracle Restart.

In addition, you can run the deinstall tool from other locations, or with a parameter file, or select other options to run the tool.

Note:

On Windows Vista, Windows Server 2008, Windows Server 2008 R2, and Windows 7, if User Account Control is enabled, then you must create a desktop shortcut to a DOS command window. Open the command window through the Run as administrator, right-click context menu, and start the deinstall tool.

For more information about the User Account Control, see "Managing User Accounts with User Account Control".

The options are:

7.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) Web site.

To download the Deinstallation Tool from OTN:

  1. Go to the following URL:

    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

  2. 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 after this page.

7.3 Example of Running the Deinstall Command

As the deinstall.bat command runs, you are prompted to provide the home directory of the Oracle software to remove from your system. Provide additional information as prompted.

If you run the deinstall tool from the deinstall.zip file, you must include the -home flag, and the help is displayed. If you run the tool from the installed ORACLE_HOME, then -home flag is not required and deinstallation starts without prompting you for a home address.

Use the optional flag -paramfile to provide a path to a parameter file.

In the following example, the deinstall.bat command is in the path C:\app\oracle\product\11.2.0\dbhome_1\deinstall, and it uses a parameter file in the software owner location C:\Documents and Settings\oracle\:

DRIVE_LETTER:\> cd \app\oracle\product\11.2.0\dbhome_1\deinstall\
DRIVE_LETTER:\> deinstall.bat -paramfile %HOMEPATH%\my_db_paramfile.tmpl

For the grid infrastructure home, use the deinstall.bat script in the Oracle grid infrastructure for a standalone server home, which in this example is C:\app\oracle\product\11.2.0\grid:

DRIVE_LETTER:\> cd \app\oracle\product\11.2.0\grid\deinstall\
DRIVE_LETTER:\> deinstall.bat -paramfile %HOMEPATH%\my_grid_paramfile.tmpl

7.4 Example of a Deinstallation Parameter File for an Oracle Database

You can run the deinstallation command on a standalone Oracle Database 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 C:\app\oracle\product\11.2.0\dbhome_1, the Oracle base (where other Oracle software is installed) is C:\app\oracle, the Oracle Inventory home is C:\Program Files\Oracle\Inventory, the virtual IP address (VIP) is 192.0.2.1, and the local node (the node where you run the deinstallation session from) is myserver:

#Copyright (c) 2005, 2006 Oracle Corporation. All rights reserved.
#Fri Jan 30 23:15:49 UTC 2009
ORACLE_BASE.orcl=C\:\\app\\oracle
FLASH_RECOVERY_LOC.orcl=C\:\\app\\oracle\\flash_recovery_area
STORAGE_TYPE.orcl=FS
DB_TYPE.orcl=SI_DB
ASM_HOME=
ASM_LOCAL_SID=
NETCA_LOCAL_LISTENERS=LISTENER
LOGDIR=C\:\\app\\oracle\\product\\11.2.0\\dbhome_1\\deinstall\\logs\\
NODE_LIST.orcl=node1
ARCHIVE_LOG_DESTINATION_LOC.orcl=
ORACLE_BASE=C\:\\app\\oracle
OLD_ACTIVE_ORACLE_HOME=
LOCAL_SID.orcl=orcl
INVENTORY_LOCATION=C\:\\Program Files\\Oracle\\Inventory
ASM_FILES.orcl=
RAW_MAPPING_FILE.orcl=
SID_LIST.orcl=orcl
DB_UNIQUE_NAME_LIST=orcl
DATAFILE_LOC.orcl=C\:\app\\oracle\\oradata\\orcl
CRS_HOME=false
HOME_TYPE=SIDB
CREATION_MODE.orcl=y
CONFIGFILE_LOC.orcl=C\:\\app\\oracle\\oradata\\orcl\\control01.ctl, C\:\\app\\oracle\\oradata\\orcl\\control02.ctl, C\:\\app\\oracle\\oradata\\orcl\\control03.ctl,C\:\\app\\oracle\\product\\11.2.0\\dbhome_1\\database\\dr1orcl.dat,C\:\\app\\oracle\\product\\11.2.0\\dbhome_1\\database\\dr2orcl.dat
ORACLE_BINARY_OK=true
local=false
LOCAL_NODE=myserver
SPFILE_LOC.orcl=C\:\\app\\oracle\\product\\11.2.0\\dbhome_1\\database\\spfileorcl.ora
silent=false
ORACLE_HOME=C\:\\app\\oracle\\product\\11.2.0\\dbhome_1
DISK_GROUPS.orcl=

7.5 Example of a Deinstallation Parameter File for Oracle Grid Infrastructure

You can run the deinstall command on an Oracle grid infrastructure for a standalone server home 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 grid infrastructure binary owner is oracle, the Oracle grid infrastructure home is in the path D\:\\app\\oracle, the Oracle base (where other Oracle software is installed) is D\:\\app\\11.2.0\\, the central Oracle ometory home (oraInventory) is C\:\\Program Files\\Oracle\\Inventory, the virtual IP address (VIP) is 192.0.2.1, the local node (the node where you are run the deinstallation session from) is myserver:

#Copyright (c) 2005, 2006 Oracle Corporation.  All rights reserved.
#Wed Feb 18 06:15:35 PST 2009
LOCAL_NODE=myserver
HOME_TYPE=SIHA
ASM_REDUNDANCY=NORMAL 
ORACLE_BASE=D\:\\app\\oracle
SCAN_PORT=0
silent=false
ASM_UPGRADE=false
ORA_CRS_HOME=D\:\\app\\oracle\\product\\11.2.0\\grid
GPNPCONFIGDIR=$ORACLE_HOME
LOGDIR=D\:\\app\\oracle\\product\\11.2.0\\db_1\\deinstall\\logs\\
GPNPGCONFIGDIR=$ORACLE_HOME
ORACLE_OWNER=Administrator
CRS_STORAGE_OPTION=0
ORACLE_BINARY_OK=true
NETCA_LISTENERS_REGISTERED_WITH_HAS=LISTENER
ASM_ORACLE_BASE=D\:\\app\\oracle
NETCFGJAR_NAME=netcfg.jar
JREDIR=D\:\\app\\oracle\\product\\11.2.0\\grid\\jdk\\jre\\
ASM_DISK_GROUPS=DATA
LANGUAGE_ID='AMERICAN_AMERICA.WE8MSWIN1252'
CSS_LEASEDURATION=400
ASM_HOME=D\:\\app\\oracle\\product\\11.2.0\\grid
ASM_DIAGNOSTIC_DEST=D\:\\app\\oracle
SHAREJAR_NAME=share.jar
HELPJAR_NAME=help4.jar
SILENT=false
local=false
INVENTORY_LOCATION=C\:\\Program Files\\Oracle\\Inventory
GNS_CONF=false
JEWTJAR_NAME=jewt4.jar
EMBASEJAR_NAME=oemlt.jar
ASM_DISKS=\\\\.\\ORCLDISKDATA0,\\\\.\\ORCLDISKDATA1,\\\\.\\ORCLDISKDATA2
ORACLE_HOME=D\:\\app\\oracle\\product\\11.2.0\\grid
CRS_HOME=true
ASM_IN_HOME=y
EWTJAR_NAME=ewt3.jar
ASM_DROP_DISKGROUPS=true
OLD_ACTIVE_ORACLE_HOME=
ASM_LOCAL_SID=+ASM
JLIBDIR=D\:\\app\\oracle\\product\\11.2.0\\grid\\jlib
VNDR_CLUSTER=false
ASM_DISK_GROUP=DATA