This chapter describes how to modify or remove Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM).
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.
This chapter contains the following topics:
See Also:
Product-specific documentation for requirements and restrictions to remove an individual productRemove installed components in the following situations:
You have successfully installed Oracle Clusterware, and you want to remove the Oracle Clusterware installation, either in an educational environment, or a test environment.
You have encountered errors during or after installing or upgrading Oracle Clusterware, and you want to reattempt an installation.
Your installation or upgrade stopped because of a hardware or operating system failure.
You are advised by Oracle Support to reinstall Oracle Clusterware.
If you have an Oracle Database installation using Oracle Restart (that is, an Oracle Grid Infrastructure installation for a standalone server), and you want to configure that server as a cluster member node, then complete the following tasks:
See Also:
Oracle Clusterware Administration and Deployment Guide for more information about the configuration wizard.Inspect the Oracle Restart configuration with srvctl
using the following syntax, where db_unique_name
is the unique name for the database, and lsnrname
is the name of the listeners:
srvctl config database -db
db_unique_name
srvctl config service -db
db_unique_name
srvctl config listener -listener
lsnrname
Write down the configuration information for the server.
Log in as root
, and change directory to Grid home/crs/install
. For example:
# cd /u01/app/12.1.0/grid/crs/install
Stop all of the databases, services, and listeners that you discovered in step 1.
If present, unmount all Oracle Automatic Storage Management Cluster File System (Oracle ACFS) filesystems.
Unconfigure the Oracle Grid Infrastructure installation for a standalone server (Oracle Restart), using the following command:
# roothas.pl -deconfig -force
Prepare the server for Oracle Clusterware configuration, as described in this document. In addition, choose if you want to install Oracle Grid Infrastructure for a cluster in the same location as Oracle Restart, or in a different location:
Installing in the Same Location as Oracle Restart
Use the deinstallation tool to remove the Oracle Restart software, but with all disk groups intact.
Proceed to step 7.
Installing in a Different Location than Oracle Restart
Install Oracle Grid Infrastructure for a cluster in the new Grid home software location.
As the Oracle Grid Infrastructure installation owner, run Oracle Clusterware Configuration Wizard, and save and stage the response file. For example:
$ Grid_home/crs/config/config.sh -silent -responseFile $HOME/GI.rsp
Run root.sh
for the Oracle Clusterware Configuration Wizard.
Mount the Oracle Restart disk group.
Enter the volenable
command to enable all Oracle Restart disk group volumes.
Mount all Oracle ACFS filesystems manually.
Add back Oracle Clusterware services to the Oracle Clusterware home, using the information you wrote down in step 1, including adding back Oracle ACFS resources. For example:
/u01/app/grid/product/11.2.0/grid/bin/srvctl add filesystem -device /dev/asm/db1 -diskgroup ORestartData -volume db1 -mountpointpath /u01/app/grid/product/11.2.0/db1 -user grid
Add the Oracle Database for support by Oracle Grid Infrastructure for a cluster, using the configuration information you recorded in step 1. Use the following command syntax, where db_unique_name
is the unique name of the database on the node, and nodename
is the name of the node:
srvctl add database -db
db_unique_name
-oraclehome $ORACLE_HOME -node
nodename
For example, first verify that the ORACLE_HOME environment variable is set to the location of the database home directory.
Next, to add the database name mydb
, and the service myservice
, enter the following commands:
srvctl add database -db mydb -oraclehome $ORACLE_HOME -node node1
Add each service to the database, using the command srvctl add service
. For example:
srvctl add service -db mydb -service myservice
After installing Oracle Grid Infrastructure for a cluster (Oracle Clusterware and Oracle ASM configured for a cluster), if you need to modify the binaries, then use the following procedure, where Grid_home
is the Oracle Grid Infrastructure for a cluster home:
Caution:
Before relinking executables, you must shut down all executables that run in the Oracle home directory that you are relinking. In addition, shut down applications linked with Oracle shared libraries.As root
:
# cd Grid_home/crs/install
# rootcrs.sh -unlock
As the Oracle Grid Infrastructure for a cluster owner:
$ export ORACLE_HOME=Grid_home $ Grid_home/bin/relink
As root
again:
# cd Grid_home/rdbms/install/ # ./rootadd_rdbms.sh # cd Grid_home/crs/install # rootcrs.sh -patch
You must relink the Oracle Clusterware and Oracle ASM binaries every time you apply an operating system patch or after an operating system upgrade.
For upgrades from previous releases, if you want to deinstall the prior release Grid home, then you must first unlock the prior release Grid home. Unlock the previous release Grid home by running the command rootcrs.sh -unlock
from the previous release home. After the script has completed, you can run the deinstallation tool.
After installing Oracle Grid Infrastructure for a cluster (Oracle Clusterware and Oracle ASM configured for a cluster), if you need to change the Grid home path, then use the following example as a guide to detach the existing Grid home, and to attach a new Grid home:
Caution:
Before changing the Grid home, you must shut down all executables that run in the Grid home directory that you are relinking. In addition, shut down applications linked with Oracle shared libraries.Log in as the Oracle Grid Infrastructure installation owner (grid
).
Change directory to Grid_home/bin and enter the command crsctl stop crs. For example:
$ cd /u01/app/12.1.0/grid/bin $ ./crsctl stop crs
Detach the existing Grid home by running the following command, where /u01/app/12.1.0/grid
is the existing Grid home location:
$ /u01/app/12.1.0/grid/oui/bin/runInstaller -silent -waitforcompletion\ -detachHome ORACLE_HOME='/u01/app/12.1.0/grid' -local
As root
, move the Grid binaries from the old Grid home location to the new Grid home location. For example, where the old Grid home is /u01/app/12.1.0/grid
and the new Grid home is /u01/app/12c/
:
# mkdir /u01/app/12c # mv /u01/app/12.1.0/grid /u01/app/12c
Clone the Oracle Grid Infrastructure installation, using the instructions provided in Oracle Clusterware Administration and Deployment Guide.
When you navigate to the Grid home/clone/bin
directory and run the clone.pl
script, provide values for the input parameters that provide the path information for the new Grid home.
As root
again, enter the following command to start up in the new home location:
# cd /u01/app/12c/crs/install # rootcrs.sh -patch -dstcrshome /u01/app/12c/
Repeat steps 1 through 4 on each cluster member node.
You must relink the Oracle Clusterware and Oracle ASM binaries every time you move the Grid home.
Running the rootcrs.sh
command flags -deconfig -force
enables you to unconfigure Oracle Clusterware on one or more nodes without removing installed binaries. This feature is useful if you encounter an error on one or more cluster nodes during installation when running the root.sh
command, such as a missing operating system package on one node. By running rootcrs.sh -deconfig -force
on nodes where you encounter an installation error, you can unconfigure Oracle Clusterware on those nodes, correct the cause of the error, and then run root.sh
again.
Note:
Stop any databases, services, and listeners that may be installed and running before deconfiguring Oracle Clusterware.Caution:
Commands used in this section remove the Oracle Grid infrastructure installation for the entire cluster. If you want to remove the installation from an individual node, then see Oracle Clusterware Administration and Deployment Guide.To unconfigure Oracle Clusterware:
Log in as the root
user on a node where you encountered an error.
Change directory to Grid_home/crs/install. For example:
# cd /u01/app/12.1.0/grid/crs/install
Run rootcrs.sh
with the -deconfig
and -force
flags. For example:
# rootcrs.sh -deconfig -force
Repeat on other nodes as required.
If you are deconfiguring Oracle Clusterware on all nodes in the cluster, then on the last node, enter the following command:
# rootcrs.sh -deconfig -force -lastnode
The -lastnode
flag completes deconfiguration of the cluster, including the OCR and voting disks.
Caution:
Run therootcrs.sh -deconfig -force -lastnode
command on a Hub Node. Deconfigure all Leaf Nodes before you run the command with the -lastnode
flag.After deconfiguring an Oracle ASM Storage Client, run the following command on the Storage Server:
asmcmd rmcc client_cluster_name
The deinstall
command removes Oracle Clusterware and Oracle ASM from your server. The following sections describe the deinstallation tool, and provide information about additional options to use the deinstallation tool:
Deinstallation Tool Command Example for Oracle Grid Infrastructure
Deinstallation Response File Example for Grid Infrastructure for a Cluster
Caution:
You must use 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.Starting with Oracle Database 12c, the deinstallation tool is integrated with the database installation media. You can run the deinstallation tool using the runInstaller
command with the -deinstall
and -home
options from the base directory of the Oracle Database, Oracle Database Client, or Oracle Grid Infrastructure installation media.
The deinstallation tool is also available as a separate command (deinstall
) in Oracle home directories after installation. It is located in the $ORACLE_HOME/deinstall
directory.
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
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 Oracle Grid Infrastructure, then the deinstaller prompts you to run the rootcrs.sh
script, as the root
user, to deconfigure Oracle Grid Infrastructure or roothas.sh
script to deconfigure Oracle Grid Infrastructure for standalone server.
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.
Caution:
When you run the deinstallation tool, if the central inventory (oraInventory) 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 deinstallation tool deletes this data.
In addition, for Oracle Grid Infrastructure installations:
Oracle Automatic Storage Management Cluster File System (Oracle ACFS) must be dismounted and Oracle Automatic Storage Management Dynamic Volume Manager (Oracle ADVM) volumes must be disabled.
If Grid Naming Service (GNS) is in use, then the entry for the subdomain needs to be deleted from DNS by your DNS administrator.
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
The deinstall
command uses the following syntax, where variable content is indicated in italics:
deinstall [-silent] [-checkonly] [-local] [-paramfile complete path of input response file] [-params name1=value name2=value . . .] [-o complete path of directory for saving files] [-help]
To run the deinstallation tool from the database installation media, use the runInstaller
command with the -deinstall
option, followed by the -home
option to specify the path of the Oracle home you want to remove using the following syntax, where variable content is indicated in italics:
runInstaller -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] [-help]
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.
In addition, you can run the deinstallation tool with a response file, or select the following options to run the tool:
-home
Use this flag to indicate the home path of the Oracle home to check or deinstall.
If you run deinstall
from the $ORACLE_HOME/deinstall
path, then the -home
flag is not required because the tool identifies the location of the home where it is run. If you use runInstaller -deinstall
from the installation media, then -home
is mandatory.
To deinstall Oracle software using the deinstall command in the Oracle home you plan to deinstall, provide a parameter file located outside the Oracle home, and do not use the -home
flag.
-silent
Use this flag to run the deinstallation tool in noninteractive mode.
A working system that it can access to determine the installation and configuration information. The -silent
flag does not work with failed installations.
A response file that contains the configuration values for the Oracle home that is being deinstalled or deconfigured.
You can generate a response file to use or modify by running the tool with the -checkonly
flag. The tool then discovers information from the Oracle home to deinstall and deconfigure. It generates the response file that you can then use with the -silent
flag. The -silent
flag does not work with failed installations
-checkonly
Use this flag to check the status of the Oracle software home configuration. Running the deinstall
command with the -checkonly
flag does not remove the Oracle configuration. The -checkonly
flag generates a response file that you can use with the deinstall
command and -silent
option.
-local
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). It does not deinstall or deconfigure Oracle software on remote nodes.
-paramfile
complete path of input response file
Use this flag to run deinstall
with a response file in a location other than the default. When you use this flag, provide the complete path where the response file is located.
The default location of the response file depends on the location of deinstall
:
From the installation media or stage location: stagelocation
/response
where stagelocation
is the path of the base directory in the installation media, or in the staged files location.
After installation from the installed Oracle home: $ORACLE_HOME/deinstall/response
-params
[name1
=value
name2
=value
name3
=value
. . .]
Use this flag with a response file to override one or more values to change in a response file you have created.
-o
complete path of directory for saving response files
Use this flag 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 location of deinstall
:
From the installation media or stage location: stagelocation
/response
where stagelocation
is the path of the base directory in the installation media, or in the staged files location.
After installation from the installed Oracle home: $ORACLE_HOME/deinstall/response
-help
Use the help option (-help
) to get additional information about the deinstallation tool option flags.
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 deinstallation tool.
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.
If you run the deinstallation tool using the deinstallation tool from the $ORACLE_HOME/deinstall
folder, then the deinstallation starts without prompting you for an ORACLE_HOME.
Use the optional flag -paramfile
to provide a path to a response file.
In the following example, the runInstaller
command is in the path /directory_path
, where directory_path
is the path to the database
directory on the installation media, and /u01/app/12.1.0/grid/
is the path to the Grid home that you want to remove:
$ cd /directory_path/
$ ./runInstaller -deinstall -home /u01/app/12.1.0/grid
The following example uses a response file in the software owner location /home/usr/grid
:
$ cd /directory_path/runInstaller
$ ./runInstaller -deinstall -paramfile /home/usr/grid/my_db_paramfile.tmpl
You can run the deinstallation tool with the -paramfile
option to use the values you specify in the response file. The following is an example of a response file for a cluster on nodes node1
and node2
, in which the Oracle Grid Infrastructure for a cluster software binary owner is grid
, the Oracle Grid Infrastructure home (Grid home) is in the path /u01/app/12.1.0/grid
, the Oracle base (the Oracle base for Oracle Grid Infrastructure, containing Oracle ASM log files, Oracle Clusterware logs, and other administrative files) is /u01/app/grid/
, the central Oracle Inventory home (oraInventory
) is /u01/app/oraInventory
, the virtual IP addresses (VIP) are 192.0.2.2
and 192.0.2.4
, the local node (the node where you run the deinstallation session from) is node1
:
#Copyright (c) 2005, 2006 Oracle Corporation. All rights reserved. #Fri Feb 06 00:08:58 PST 2009 LOCAL_NODE=node1 HOME_TYPE=CRS ASM_REDUNDANCY=\ ORACLE_BASE=/u01/app/12.1.0/grid/ VIP1_MASK=255.255.252.0 VOTING_DISKS=/u02/storage/grid/vdsk SCAN_PORT=1522 silent=true ASM_UPGRADE=false ORA_CRS_HOME=/u01/app/12.1.0/grid GPNPCONFIGDIR=$ORACLE_HOME LOGDIR=/home/grid/SH/deinstall/logs/ GPNPGCONFIGDIR=$ORACLE_HOME ORACLE_OWNER=grid NODELIST=node1,node2 CRS_STORAGE_OPTION=2 NETWORKS="eth0"/192.0.2.1\:public,"eth1"/10.0.0.1\:cluster_interconnect VIP1_IP=192.0.2.2 NETCFGJAR_NAME=netcfg.jar ORA_DBA_GROUP=dba CLUSTER_NODES=node1,node2 JREDIR=/u01/app/12.1.0/grid/jdk/jre VIP1_IF=eth0 REMOTE_NODES=node2 VIP2_MASK=255.255.252.0 ORA_ASM_GROUP=asm LANGUAGE_ID=AMERICAN_AMERICA.WE8ISO8859P1 CSS_LEASEDURATION=400 NODE_NAME_LIST=node1,node2 SCAN_NAME=node1scn SHAREJAR_NAME=share.jar HELPJAR_NAME=help4.jar SILENT=false local=false INVENTORY_LOCATION=/u01/app/oraInventory GNS_CONF=false JEWTJAR_NAME=jewt4.jar OCR_LOCATIONS=/u02/storage/grid/ocr EMBASEJAR_NAME=oemlt.jar ORACLE_HOME=/u01/app/12.1.0/grid CRS_HOME=true VIP2_IP=192.0.2.4 ASM_IN_HOME=n EWTJAR_NAME=ewt3.jar HOST_NAME_LIST=node1,node2 JLIBDIR=/u01/app/12.1.0/grid/jlib VIP2_IF=eth0 VNDR_CLUSTER=false CRS_NODEVIPS='node1-vip/255.255.252.0/eth0,node2-vip/255.255.252.0/eth0' CLUSTER_NAME=node1-cluster
Note:
Do not use quotation marks with variables except in the following cases:Around addresses in CRS_NODEVIPS:
CRS_NODEVIPS='n1-vip/255.255.252.0/eth0,n2-vip/255.255.252.0/eth0'
Around interface names in NETWORKS:
NETWORKS="eth0"/192.0.2.1:public,"eth1"/10.0.0.1:cluster_interconnect "eth2"/192.0.2.2:vip1_ip