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

Part Number E24321-07
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. It includes information about removing Oracle software using the deinstallation tool.

The deinstall command removes standalone Oracle Database installations, Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM) from your server, and also 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.

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

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.

See Also:

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

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

Caution:

When you run the deinstall command, if the central inventory (oraInventory) contains no other registered homes besides the home that you are deconfiguring and removing, then the deinstall command 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 deinstall command uses the following syntax, where variable content is indicated in italics:

deinstall -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 deinstallation tool is from the deinstall directory in the Oracle home as the installation owner:

$ $ORACLE_HOME/deinstall/deinstall

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.

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

The options are:

Deinstalling Previous Release Grid Home

For upgrades from previous releases, if you want to deinstall the previous release Grid home, then as the root user, you must manually change the permissions of the previous release Grid home, and then run the deinstall command.

For example:

# chown -R grid:oinstall /u01/app/grid/11.2.0
# chmod -R 775 /u01/app/grid/11.2.0

In this example, /u01/app/grid/11.2.0 is the previous release Grid home.

7.2 Downloading the Deinstallation 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:

  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 at the end of this Web page.

7.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/dbhome_1/deinstall, and it uses a parameter file in the software owner location /home/usr/oracle:

$ cd /u01/app/oracle/product/11.2.0/dbhome_1/deinstall
$ ./deinstall -paramfile /home/usr/oracle/my_db_paramfile.tmpl

For the Oracle Grid Infrastructure home, use the deinstallation script in the Oracle Grid Infrastructure for a standalone server home, which in this example is /u01/app/oracle/product/11.2.0/grid:

$ cd /u01/app/oracle/product/11.2.0/grid/deinstall
$ ./deinstall -paramfile /home/usr/oracle/my_grid_paramfile.tmpl

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.

7.4 Deinstallation Parameter File Example for Oracle Database

You can run the deinstall 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 /u01/app/oracle/product/11.2.0/dbhome_1/, the Oracle base (where other Oracle software is installed) is /u01/app/oracle/, the central Oracle Inventory home (oraInventory) is /u01/app/oraInventory, the virtual IP address (VIP) is 192.0.2.1, the local node (the node where you run the deinstallation session from) is myserver, and the OSDBA group is dba:

#Copyright (c) 2005, 2006 Oracle Corporation. All rights reserved.
#Mon Feb 16 06:48:39 UTC 2009
DISK_GROUPS.sidb=
ASM_HOME=
ASM_LOCAL_SID=
LOGDIR=/u01/app/oracle/product/11.2.0/dbhome_1/oraInventory/logs/
ORACLE_BASE.sidb=/u01/app/oracle/
RECOVERY_LOC.sidb=
STORAGE_TYPE.sidb=FS
ORACLE_BASE=/u01/app/oracle/
INVENTORY_LOCATION=/u01/app/oraInventory
DB_TYPE.sidb=SI_DB
NODE_LIST.sidb=myserver
ARCHIVE_LOG_DESTINATION_LOC.sidb=
LOCAL_SID.sidb=sidb
DB_UNIQUE_NAME_LIST=sidb
ASM_FILES.sidb=
HOME_TYPE=SIDB
CRS_HOME=false
RAW_MAPPING_FILE.sidb=
SID_LIST.sidb=sidb
ORACLE_BINARY_OK=true
DATAFILE_LOC.sidb=/u01/app/oracle/oradata
local=false
LOCAL_NODE=myserver
CREATION_MODE.sidb=y
CONFIGFILE_LOC.sidb=
DIAG_DEST.sidb=/u01/app/oracle/
silent=false
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/
SPFILE_LOC.sidb=

7.5 Deinstallation Parameter File Example 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 /u01/app/oracle/product/11.2.0/grid, the Oracle base (where other Oracle software is installed) is /u01/app/oracle/, the central Oracle Inventory home (oraInventory) is /u01/app/oraInventory, the local node (the node where you run the deinstallation session from) is myserver, and the OSDBA group is dba:

#Copyright (c) 2005, 2009 Oracle Corporation.  All rights reserved.
#Thu Mar 05 11:36:03 PST 2009
LOCAL_NODE=myserver
HOME_TYPE=SIHA
ASM_REDUNDANCY=EXTERNAL
ORACLE_BASE=/u01/app/oracle/
SCAN_PORT=0
silent=false
ASM_UPGRADE=false
ORA_CRS_HOME=/u01/app/oracle/product/11.2.0/grid
GPNPCONFIGDIR=$ORACLE_HOME
LOGDIR=/home/oracle/tmp/deinstall/logs/
ASM_DISCOVERY_STRING=/u02/stor/asm*
GPNPGCONFIGDIR=$ORACLE_HOME
ORACLE_OWNER=oracle
ASM_DISKSTRING=
CRS_STORAGE_OPTION=0
ORACLE_BINARY_OK=true
OCR_VOTINGDISK_IN_ASM=false
ASM_ORACLE_BASE=/u01/app/oracle
NETCFGJAR_NAME=netcfg.jar
ORA_DBA_GROUP=dba
JREDIR=/u01/app/oracle/grid/jdk/jre/
ORA_ASM_GROUP=dba
LANGUAGE_ID='AMERICAN_AMERICA.WE8ISO8859P1'
CSS_LEASEDURATION=400
ASM_HOME=/u01/app/oracle/grid
SHAREJAR_NAME=share.jar
HELPJAR_NAME=help4.jar
SILENT=false
local=false
INVENTORY_LOCATION=/u01/app/oraInventory
GNS_CONF=false
JEWTJAR_NAME=jewt4.jar
EMBASEJAR_NAME=oemlt.jar
ASM_DISKS=/u02/stor/asm/asm0,/u02/stor/asm/asm2,/u02/stor/asm/asm3,/u02/stor/asm/asm1,/u02/stor/asm/asm4,/u02/stor/asm/asm5,/u02/stor/asm/asm6,
/u02/stor/asm/asm7,/u02/stor/asm/asm8
ORACLE_HOME=/u01/app/oracle/grid
CRS_HOME=true
ASM_IN_HOME=true
EWTJAR_NAME=ewt3.jar
ASM_DROP_DISKGROUPS=false
ASM_LOCAL_SID=+ASM
JLIBDIR=/u01/app/oracle/grid/jlib
VNDR_CLUSTER=false
ASM_DISK_GROUP=DATA