Skip Headers
Oracle® Grid Infrastructure Installation Guide
11g Release 2 (11.2) for Microsoft Windows x64 (64-Bit)

Part Number E24169-04
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

6 How to Modify or Deinstall Oracle Grid Infrastructure

This chapter describes how to remove or deconfigure Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM) software from your server.

This chapter contains the following topics:

See Also:

Product-specific documentation for requirements and restrictions to remove an individual product

6.1 Deciding When to Deinstall Oracle Clusterware

Remove installed components in the following situations:

6.2 Migrating Standalone Grid Infrastructure Servers to a Cluster

If you have an Oracle Database installation using Oracle Restart (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:

  1. Inspect the Oracle Restart configuration with the Server Control (SRVCTL) utility using the following syntax, where db_unique_name is the unique name for the database, and lsnrname is the name of the listener for the database:

    srvctl config database -d db_unique_name
    srvctl config service -d db_unique_name
    srvctl config listener -l lsnrname
    

    Write down the configuration information for the server, because you will need this information in a later step.

  2. Stop all of the databases, services, and listeners that you discovered in step 1.

  3. If present, unmount all Oracle ASM Cluster File System (Oracle ACFS) file systems.

  4. Go to the directory Grid_home\crs\install, where Grid_home is the location of your Oracle Grid Infrastructure home (Grid home) directory, for example:

    C:\> cd app\11.2.0\grid\crs\install
    
  5. Deconfigure and deinstall the Oracle Grid Infrastructure installation for a standalone server (Oracle Restart) using the following command:

    C:\..\install> roothas.pl -deconfig
    
  6. Prepare the server for Oracle Clusterware configuration, as described in either Chapter 1, "Typical Installation for Oracle Grid Infrastructure for a Cluster" or Chapter 2, "Advanced Installation Oracle Grid Infrastructure for a Cluster Preinstallation Tasks".

  7. If you are using Oracle Grid Infrastructure release 11.2.0.2 or higher, then, as the Oracle Grid Infrastructure installation owner, run Oracle Clusterware Configuration Wizard. Save and stage the response file. For the -responseFile parameter, specify the full path name where the response file should be written by the Oracle Clusterware Configuration Wizard, for example:

    C:\..\crs> cd ..\config
    C:\..\config> config.bat -silent -responseFile C:\user\dba1\scripts\GI.rsp
    
  8. If you are using Oracle Grid Infrastructure release 11.2.0.1, then configure the cluster using a response file as described in Appendix B, "Installing and Configuring Oracle Grid Infrastructure Using Response Files."

  9. Mount the Oracle ASM disk group used by Oracle Restart.

  10. If you used Oracle ACFS with Oracle Restart, then start Oracle ASM Configuration Assistant (ASMCA). Run the volenable command to enable all Oracle Restart disk group volumes.

  11. If you used Oracle ACFS with Oracle Restart, then mount all Oracle ACFS file systems manually.

  12. Add back Oracle Clusterware services to the Oracle Clusterware home, using the information you wrote down in step 1:

    1. Register the Oracle ACFS resources. Use a command similar to the following, where Grid_home is the location of your Oracle Grid Infrastructure installation:

      C:\> Grid_home\bin\srvctl add filesystem -d \\.\ORCLDATADISK4  
      -g ORestartData -v db1 -m C:\app\11.2.0\grid\db1 -u grid
      
    2. Register the Oracle Database resources with Oracle Clusterware. 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 -d db_unique_name -o %ORACLE_HOME% -x nodename
      

      For example, for the database name mydb on the local node node1, first verify that the ORACLE_HOME environment variable is set to the location of the database home directory, then enter the following command to register the database with Oracle Clusterware:

      srvctl add database -d mydb -o %ORACLE_HOME% -x node1
      
    3. Register each database service, using the command srvctl add service. For example, if your database name is mydb and you created a service named myservice for this database, then enter the following command:

      srvctl add service -d mydb -s myservice
      

6.3 Deconfiguring Oracle Clusterware Without Removing the Software

Running the rootcrs.pl command with the flags -deconfig -force enables you to deconfigure Oracle Clusterware on one or more nodes without removing the installed software. This feature is useful if you encounter an error on one or more cluster nodes during installation, such as incorrectly configured shared storage. By running rootcrs.pl -deconfig -force on nodes where you encounter an installation error, you can deconfigure Oracle Clusterware on those nodes, correct the cause of the error, and then run rootcrs.pl 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 refer to Oracle Clusterware Administration and Deployment Guide.

To deconfigure Oracle Clusterware:

  1. Log in using a member of the Administrators group on a node where you encountered an error during installation.

  2. Change directory to Grid_home\crs\install. For example:

    C:\> cd C:\app\11.2.0\grid\crs\install
    
  3. Run rootcrs.pl with the -deconfig -force flags. For example:

    C:\..\install> perl rootcrs.pl -deconfig -force
    

    Repeat on other nodes as required.

  4. If you are deconfiguring Oracle Clusterware on all nodes in the cluster, then on the last node, enter the following command:

    C:\..\install> perl rootcrs.pl -deconfig -force -lastnode
    

    The -lastnode flag completes deconfiguration of the cluster, including the Oracle Cluster Registry (OCR) and voting disks.

Note:

The -force flag must be specified when running the rootcrs.pl script if there exist running resources that depend on the resources started from the Oracle Clusterware home you are deleting, such as databases, services, or listeners. You must also use the -force flag if you are removing a partial, or failed installation.

6.4 Removing Oracle Clusterware and Oracle ASM Software

The deinstall tool removes Oracle Clusterware and Oracle ASM from your server. The following sections describe the command, and provide information about additional options to use with the command:

6.4.1 About the Deinstallation Tool

The Deinstallation tool (deinstall.bat) stops Oracle programs, and removes Oracle software and configuration files on the operating system. The Deinstallation tool is available in Oracle home directories after installation as %ORACLE_HOME%\deinstall\deinstall.bat. The Deinstallation tool command is also available for download from Oracle Technology Network (OTN) at the following URL:

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

You can download the Deinstallation tool with the complete Oracle Database 11g release 2 software, or as a separate archive file. To download the Deinstallation tool separately, click the See All link next to the software version.

The Deinstallation tool 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.bat command using the –checkonly flag and -o flag. You can also edit a response file template to create a parameter file.

The Deinstallation tool command 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 cluster installation, then the tool prompts you to run the rootcrs.pl script as a user that is a member of the Administrators group.

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 RAC 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 Deinstallation tool 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

Note:

You cannot use the Deinstallation tool with the -local option for a shared Oracle home.

The default method for running the Deinstallation tool is from the deinstall directory in the Grid home. In addition, you can run the Deinstallation tool from other locations, or with a parameter file, or specify options when running the deinstall.bat command. See

The options you can use with the deinstall.bat command are:

  • -home

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

    If you run deinstall from the Grid_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

  • -silent

    Use this flag to run the command in noninteractive mode. This option requires one of the following:

    • A working system that the Deinstallation tool can access to determine the installation properties

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

    To create a properties file, modify the template file deinstall.rsp.tmpl, located in the response folder of the Deinstallation tool home or the Oracle home.

    If you have a working system, you can generate a properties file to use or modify by running the deinstall.bat command with the -checkonly flag. The deinstall.bat 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.

  • -checkonly

    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. This flag generates a properties file that you can use with the deinstall.bat command.

    When you use the -checkonly flag to generate a properties 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

    Use this flag on a multinode environment to deconfigure Oracle software in a cluster.

    When you run deinstall.bat with this flag, 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.

    Note:

    • This flag can only be used in cluster environments.

    • You cannot use the Deinstallation tool with the -local option for a shared Oracle home.

  • -cleanupOBase

    Use this flag to force the removal of all the contents in the Oracle base directory, including the admin, oradata, and flash_recovery_area directories. This flag forces an Oracle base removal only if the Oracle home that you specify with the -home flag is the only Oracle home that Oracle base directory is associated with. This flag is available with the Deinstallation tool available in the Oracle Grid Infrastructure and Oracle Database 11.2.0.3 patch release, and from Oracle Technology Network (OTN).

  • -paramfile complete path of input parameter property file

    This is an optional flag. You can use this flag to run deinstall.bat 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. If you are running the deinstall.bat command from the Oracle home that you plan to deinstall, then you do not need to use the -paramfile flag.

    The default location of the parameter file depends on the location of the Deinstallation tool:

    • From the installation media or stage location: <Drive>:\staging_location\deinstall\response

    • From a unzipped archive file downloaded from OTN: <Drive>:\ziplocation\deinstall\response, where <Drive>:\ziplocation refers to the directory in which the downloaded archive file was extracted.

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

  • -params [name1=value name2=value name3=value . . .]

    Use this flag with a parameter file to override one or more values in a parameter file that you 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 properties file depends on the location of the Deinstallation tool:

    • Extracted from an archive file downloaded from OTN: <Drive>:\ziplocation\response, where <Drive>:\ziplocation\ refers to directory in which the downloaded archive file was extracted.

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

  • -help

    Use the help option (-help) to obtain additional information about the command option flags.

If you use the deinstall.bat command located in an Oracle home, or the deinstall.bat command downloaded from OTN (not installed in an Oracle home), then it writes log files in the C:\Program Files\Oracle\Inventory\logs directory. If, however, you are using the deinstall.bat command to remove the last Oracle home installed on the server, then the log files are written to:

  • %TEMP%\OraDeinstall<timestamp>\logs if you use the deinstall.bat command located in the Oracle home

  • <Drive>:\ziplocation\deinstall\logs if you use the deinstall.bat command downloaded from OTN, where <Drive>:\ziplocation\ refers to directory in which the downloaded archive file was extracted

6.4.2 Downloading the Deinstallation Tool from Oracle Technology Network

You can use the Deinstallation tool (deinstall.bat) to remove failed or incomplete installations. 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. Read and accept the OTN license agreement.

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

6.4.3 Using the Deinstallation Tool to Remove Oracle Clusterware and Oracle ASM

This section provides examples of using the Deinstallation tool to remove Oracle Grid Infrastructure software.

Example 6-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 properties file.

To use the Deinstallation tool located in the Oracle home directory, issue the following commands, where C:\app\11.2.0\grid is the location of Grid home:

Example 6-2 Running the Deinstallation Tool Installed in an Oracle Home

To run the deinstall.bat command located in an Oracle Database home in the path C:\app\11.2.0\grid, enter the following command while logged in as a member of the Administrator group:

C:\> cd app\
C:\app\> 11.2.0\grid\deinstall\deinstall.bat

To completely remove the Oracle Database installation, you must run the deinstall.bat command from a prompt that is located outside of the Oracle home. If you run the deinstall.bat command after changing into the Oracle_home\deinstall directory, then the Deinstallation tool will not be able to remove all the Oracle software files and directories.

Example 6-3 Running deinstall.bat Interactively From a Location Outside the Oracle Home

If you use the separately downloaded version of the Deinstallation tool, 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 properties file.

If your Oracle Grid Infrastructure for a cluster home is C:\app\11.2.0\grid, then enter the following command while logged in as a member of the Administrators group to remove the Oracle Grid Infrastructure installation from your cluster:

C:\> app\deinstall\deinstall.bat -home C:\app\11.2.0\grid

Provide additional information as prompted. 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.

Example 6-4 Running deinstall.bat From the Oracle Home Using a Parameter File

To run the deinstall.bat command located in an Oracle Grid Infrastructure home and use a parameter file located at C:\users\oracle\paramfile4.tmpl, enter the following commands while logged in as a member of the Administrators group:

C:\> cd app\11.2.0
C:\> grid\deinstall\deinstall.bat -paramfile C:\users\oracle\paramfile4.tmpl

Example 6-5 Generating a Response File For Use With the deinstall.bat Command

You can generate the a parameter file by running the deinstall.bat command with the -checkonly and -o flags 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 parameter file.

To generate the parameter file deinstall_OraCrs11g_home1.rsp using deinstall.bat command located in the Oracle home and the -checkonly flag, enter a command similar to the following, where C:\app\11.2.0\grid is the location of the Grid home and C:\users\oracle is the directory in which the generated parameter file is created:

C:\> app\11.2.0\grid\deinstall\deinstall -checkonly -o C:\users\oracle\

6.4.4 Example Parameter File for Deinstall of Oracle Grid Infrastructure

You can run the deinstall command with the -paramfile option. When you use this option, the Deinstallation tool uses the values specified in the parameter file and, if needed, prompts you to supply any missing information.

The following is an example of a parameter file for a cluster on nodes node1 and node2, in which the Oracle Grid Infrastructure for a cluster is installed by the user oracle, the Grid home is C:\app\11.2.0\grid, the Oracle base (for the software owner, oracle) is C:\app\oracle\, the central Oracle Inventory home is C:\Program Files\Oracle\Inventory, the virtual IP addresses (VIP) are 192.0.2.2 and 192.0.2.4, and the local node (the node on which you run the deinstall.bat command) is node1:

#Copyright (c) 2005, 2009 Oracle Corporation.  All rights reserved.
VIP1_IP=192.0.2.2
LOCAL_NODE=node1
ORA_VD_DISKGROUPS=+DATA
VIP1_IF=PublicNIC
OCRID=
ObaseCleanupPtrLoc=C:\Temp\OraDeinstall112010-02-11_10-14-30AM\utl\...
HELPJAR_NAME=help4.jar
local=false
ORACLE_HOME=C:\app\11.2.0\grid
ASM_HOME=C:\app\11.2.0\grid
ASM_DISK_GROUPS=
ASM_DISK_GROUP=DATA
ORA_DBA_GROUP=
ASM_DISCOVERY_STRING=
NEW_HOST_NAME_LIST=
PRIVATE_NAME_LIST=
ASM_DISKS=\\.\ORCLDISKDATA0,\\.\ORCLDISKDATA1,\\.\ORCLDISKDATA2
ASM_DISKSTRING=
CRS_HOME=true
JLIBDIR=C:\app\11.2.0\grid\jlib
OCRLOC=
JEWTJAR_NAME=jewt4.jar
EMBASEJAR_NAME=oemlt.jar
CRS_STORAGE_OPTION=1
ASM_REDUNDANCY=EXTERNAL
GPNPGCONFIGDIR=$ORACLE_HOME
LANGUAGE_ID='AMERICAN_AMERICA.WE8MSWIN1252'
CRS_NODEVIPS='node1-vip/255.255.252.0/PublicNIC,node2-vip/255.255.252.0/PublicNIC'
ORACLE_OWNER=Administrator
OLD_ACTIVE_ORACLE_HOME=
GNS_ALLOW_NET_LIST=
silent=false
LOGDIR=C:\Temp\OraDeinstall112010-02-11_10-14-30AM\logs\
OCFS_CONFIG=
NODE_NAME_LIST=node1,node2
GNS_DENY_ITF_LIST=
ORA_CRS_HOME=C:\app\11.2.0\grid
JREDIR=C:\app\11.2.0\grid\jdk\jre
ASM_LOCAL_SID=+asm1
ORACLE_BASE=C:\app\oracle\
GNS_CONF=false
NETCFGJAR_NAME=netcfg.jar
ORACLE_BINARY_OK=true
OCR_LOCATIONS=NO_VAL
ASM_ORACLE_BASE=C:\app\oracle
OLRLOC=
GPNPCONFIGDIR=$ORACLE_HOME
ORA_ASM_GROUP=
GNS_DENY_NET_LIST=
OLD_CRS_HOME=
EWTJAR_NAME=ewt3.jar
NEW_NODE_NAME_LIST=
GNS_DOMAIN_LIST=
ASM_UPGRADE=false
NETCA_LISTENERS_REGISTERED_WITH_CRS=LISTENER
CLUSTER_NODES=node1,node2
CLUSTER_GUID=
NEW_PRIVATE_NAME_LIST=
ASM_DIAGNOSTIC_DEST=C:\APP\ORACLE
CLSCFG_MISSCOUNT=
SCAN_PORT=1521
ASM_DROP_DISKGROUPS=true
NETWORKS="PublicNIC"/192.0.2.1:public,"PrivateNIC"/10.0.0.1:cluster_interconnect
OCR_VOTINGDISK_IN_ASM=true
NODELIST=node1,node2
ASM_IN_HOME=true
HOME_TYPE=CRS
GNS_ADDR_LIST=
CLUSTER_NAME=myrac-cluster
SHAREJAR_NAME=share.jar
VOTING_DISKS=NO_VAL
SILENT=false
VNDR_CLUSTER=false
GPNP_PA=
CSS_LEASEDURATION=400
REMOTE_NODES=node2
ASM_SPFILE=
HOST_NAME_LIST=node1,node2
SCAN_NAME=myrac-scan
VIP1_MASK=255.255.252.0
INVENTORY_LOCATION=C:\Program Files\Oracle\Inventory

Note:

Do not use quotation marks around any of the values in this file, except in the following cases:
  • Around addresses for the CRS_NODEVIPS parameter:

    CRS_NODEVIPS='node1-vip/255.255.252.0/PublicNIC,node2-vip/..'
    
  • Around interface names for the NETWORKS parameters:

    NETWORKS="PublicNIC"/192.0.2.1:public,"PrivateNIC"/10.0.0.1
     :cluster_interconnect