Deinstall Oracle Homes On Exadata Database Machine

Written by

in

Overview
After
Oracle Platinum upgrades Oracle software for example from 11.2.0.3 to 11.2.0.4,
the OLD Oracle Homes are not removed immediately. There are 2 different types
of Oracle Home, Grid Infrastructure (ASM + Clusterware) home and RDBMS
(Database software) home.
In this article I will
demonstrate how to De-install Oracle 11gR2 and 12cR1 Homes on Exadata database
machine.
Why De-install Oracle Software?
One should consider de-installing
Oracle software for the following reasons:
  • To save disk
    space
  • To ease
    management complexities
  • To avoid
    accidentally using unused home

About De-install Utility
The de-install utility works
different for Oracle Database 11g and 12c.
Starting with Oracle database
11.2.0.1, Oracle recommends to use de-install utility to de-install Oracle 11.2
software.

You can de-install Oracle database 11gR2 software in 2
ways:
  • External De-install
    Utility – highly recommended method
  • runInstaller

In Oracle Database 12c, deinstall
utility is now integrated with the Database Installation Media. You can run the
deinstall utility using the runInstaller command on Linux and UNIX. In 12c, the
de-install external standalone utility is replaced with a deinstall option
using Oracle Universal Installer (OUI). The standalone or external deinstall
utility is no longer provided as a separate installation media.
You can de-install Oracle database 12cR1 software in 3
ways:
  • From
    Installation Media using runInstaller (UNIX)
  • After
    Installation from ORACLE_HOME/deinstall directory
  • Using
    Parameter / Response file

De-install utility can be used to de-install
  • Grid
    Infrastructure home (GRID_HOME)
  • Oracle Real
    Application (RAC) Database Home
  • Non-RAC
    Database Home (Single instance)
  • Grid
    Infrastructure for standalone server Homes.

Procedure Download De-install utility for 11gR2
  • De-install
    utility can be downloaded from:

  • Accept
    license Agreement

  • Select
    latest Oracle database version based on your Operating system. 

Here I am
selecting Oracle Database 11.2.0.1 and Linux x86-64
  • Click
    on the “See All” hyper link to see
    all the software underneath it.
  • Accept
    License Agreement and look for the latest Oracle database version. For Example
    11.2.0.4

Note: It is recommended to use the latest version
of the 11.2 de-install utility. If you want to de-install 11.2.0.1, 11.2.0.2 or
11.2.0.3 then you should use the latest version of the 11.2 de-install utility,
which would be version 11.2.0.4.
  • Click on the
    download link to download the De-install utility for 11.2.0.4
  •  Enter the
    username and password, if prompted.
  • Download box
    will appear on your screen click OK to save the file.


Copy De-install Utility to Exadata Compute
Once De-install utility is
downloaded, copy the zip to Exadata Compute node 1 and unzip it into a staging
area. You can use WinScp or similar tool to copy the de-install utility to
Exadata Compute node.
Here I copied the file under “/u01/app/oracle/software” directory.

Unzip De-install utility
Use unzip OS command to unzip the
de-install utility. This will create a sub-directory called “deinstall” which
contains deinstall script.

De-install utility Options
The following
are the options available with Oracle De-install utility.

De-install DATABASE and GRID Homes
Before running de-install:
  •  Unzip
    de-install utility into a directory outside Oracle Home.
  • No databases
    configured to use the Oracle home.

$ srvctl config database -d <db_name>
  •  Home is not
    a configured Grid Home.

$ ps -ef|grep d.bin
  • ASM is not
    detected in the Oracle Home.

$ env | grep
HOME

Steps to De-install Oracle 11gR2 database
software
  • After the upgrade is complete and
    the database and application have been validated and in use for some time, the
    11.2.0.2 or 11.2.0.3 database and grid homes can be removed using the deinstall
    tool. 
  • Run deinstall commands on the
    first database server. 
  • The deinstall tool will perform
    the deinstallation on all database servers. 

Deinstall Database Home

Here we are deinstalling Oracle
Home:  /u01/app/oracle/product/11.2.0.2/dbhome_1/
Replace the location with Oracle
Home location you are deinstalling.
Navigate to deinstall directory
and perform a deinstall check only. The –checkonly option we will only perform
a check without deinstalling the software.
oracle@dm01db01-/u01/app/oracle/software:$
cd /u01/app/oracle/software/deinstall

oracle@dm01db01-/u01/app/oracle/software/deinstall:$
./deinstall -checkonly -home /u01/app/oracle/product/11.2.0.2/dbhome_1/
Location of logs
/u01/app/oraInventory/logs/
############ ORACLE DEINSTALL
& DECONFIG TOOL START ############
######################### CHECK
OPERATION START #########################
## [START] Install check
configuration ##
Checking for existence of the
Oracle home location /u01/app/oracle/product/11.2.0.2/dbhome_1
Oracle Home type selected for
deinstall is: Oracle Real Application Cluster Database
Oracle Base selected for
deinstall is: /u01/app/oracle
Checking for existence of central
inventory location /u01/app/oraInventory
Checking for existence of the
Oracle Grid Infrastructure home /u01/app/11.2.0.4/grid
The following nodes are part of
this cluster: dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Checking for sufficient temp
space availability on node(s) : ‘dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
## [END] Install check
configuration ##
Network Configuration check
config START
Network de-configuration trace
file location: /u01/app/oraInventory/logs/netdc_check2015-08-13_03-33-18-AM.log
Network Configuration check
config END
Database Check Configuration
START
Database de-configuration trace
file location:
/u01/app/oraInventory/logs/databasedc_check2015-08-13_03-33-23-AM.log
Use comma as separator when
specifying list of values as input
Specify the list of database
names that are configured in this Oracle home []:
Database Check Configuration END
Enterprise Manager Configuration
Assistant START
EMCA de-configuration trace file
location: /u01/app/oraInventory/logs/emcadc_check2015-08-13_03-33-30-AM.log
Enterprise Manager Configuration
Assistant END
Oracle Configuration Manager
check START
OCM check log file location :
/u01/app/oraInventory/logs//ocm_check_2015-08-13_03-33-30-AM.log
Oracle Configuration Manager
check END
######################### CHECK
OPERATION END #########################
####################### CHECK
OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home
is: /u01/app/11.2.0.4/grid
The cluster node(s) on which the
Oracle home deinstallation will be performed are:dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Oracle Home selected for
deinstall is: /u01/app/oracle/product/11.2.0.2/dbhome_1
Inventory Location where the
Oracle home registered is: /u01/app/oraInventory
No Enterprise Manager
configuration to be updated for any database(s)
No Enterprise Manager ASM targets
to update
No Enterprise Manager listener
targets to migrate
Checking the config status for
CCR
dm01db01 : Oracle Home exists and
CCR is configured
dm01db02 : Oracle Home exists and
CCR is configured
dm01db03 : Oracle Home exists and
CCR is configured
dm01db04 : Oracle Home exists and
CCR is configured
dm01db05 : Oracle Home exists and
CCR is configured
dm01db06 : Oracle Home exists and
CCR is configured
dm01db07 : Oracle Home exists and
CCR is configured
dm01db08 : Oracle Home exists and
CCR is configured
CCR check is finished
A log of this session will be
written to:
‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-33-08-AM.out’
Any error messages from this
session will be written to:
‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-33-08-AM.err’
############# ORACLE DEINSTALL
& DECONFIG TOOL END #############
Now perform the deinstall using
the following command.
orcl1@dm01db01-/u01/app/oracle/software/deinstall:
./deinstall -home /u01/app/oracle/product/11.2.0.2/dbhome_1/
Location of logs
/u01/app/oraInventory/logs/
############ ORACLE DEINSTALL
& DECONFIG TOOL START ############
######################### CHECK
OPERATION START #########################
## [START] Install check
configuration ##
Checking for existence of the
Oracle home location /u01/app/oracle/product/11.2.0.2/dbhome_1
Oracle Home type selected for
deinstall is: Oracle Real Application Cluster Database
Oracle Base selected for
deinstall is: /u01/app/oracle
Checking for existence of central
inventory location /u01/app/oraInventory
Checking for existence of the
Oracle Grid Infrastructure home /u01/app/11.2.0.4/grid
The following nodes are part of
this cluster: dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Checking for sufficient temp
space availability on node(s) : ‘dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
## [END] Install check
configuration ##
Network Configuration check
config START
Network de-configuration trace
file location: /u01/app/oraInventory/logs/netdc_check2015-08-13_03-34-50-AM.log
Network Configuration check
config END
Database Check Configuration
START
Database de-configuration trace
file location:
/u01/app/oraInventory/logs/databasedc_check2015-08-13_03-34-56-AM.log
Use comma as separator when
specifying list of values as input
Specify the list of database
names that are configured in this Oracle home []:
Database Check Configuration END
Enterprise Manager Configuration
Assistant START
EMCA de-configuration trace file
location: /u01/app/oraInventory/logs/emcadc_check2015-08-13_03-35-05-AM.log
Enterprise Manager Configuration
Assistant END
Oracle Configuration Manager
check START
OCM check log file location :
/u01/app/oraInventory/logs//ocm_check_2015-08-13_03-35-06-AM.log
Oracle Configuration Manager
check END
######################### CHECK
OPERATION END #########################
####################### CHECK
OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home
is: /u01/app/11.2.0.4/grid
The cluster node(s) on which the
Oracle home deinstallation will be performed are:dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Oracle Home selected for
deinstall is: /u01/app/oracle/product/11.2.0.2/dbhome_1
Inventory Location where the
Oracle home registered is: /u01/app/oraInventory
No Enterprise Manager
configuration to be updated for any database(s)
No Enterprise Manager ASM targets
to update
No Enterprise Manager listener
targets to migrate
Checking the config status for
CCR
dm01db01 : Oracle Home exists and
CCR is configured
dm01db02 : Oracle Home exists and
CCR is configured
dm01db03 : Oracle Home exists and
CCR is configured
dm01db04 : Oracle Home exists and
CCR is configured
dm01db05 : Oracle Home exists and
CCR is configured
dm01db06 : Oracle Home exists and
CCR is configured
dm01db07 : Oracle Home exists and
CCR is configured
dm01db08 : Oracle Home exists and
CCR is configured
CCR check is finished
Do you want to continue (y – yes,
n – no)? [n]: y
A log of this session will be
written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-34-40-AM.out’
Any error messages from this
session will be written to:
‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-34-40-AM.err’
######################## CLEAN
OPERATION START ########################
Enterprise Manager Configuration
Assistant START
EMCA de-configuration trace file
location: /u01/app/oraInventory/logs/emcadc_clean2015-08-13_03-35-05-AM.log
Updating Enterprise Manager ASM
targets (if any)
Updating Enterprise Manager listener
targets (if any)
Enterprise Manager Configuration
Assistant END
Database de-configuration trace
file location:
/u01/app/oraInventory/logs/databasedc_clean2015-08-13_03-35-33-AM.log
Network Configuration clean
config START
Network de-configuration trace
file location: /u01/app/oraInventory/logs/netdc_clean2015-08-13_03-35-33-AM.log
De-configuring Listener
configuration file on all nodes…
Listener configuration file
de-configured successfully.
De-configuring Naming Methods
configuration file on all nodes…
Naming Methods configuration file
de-configured successfully.
De-configuring Local Net Service
Names configuration file on all nodes…
Local Net Service Names
configuration file de-configured successfully.
De-configuring Directory Usage
configuration file on all nodes…
Directory Usage configuration
file de-configured successfully.
De-configuring backup files on
all nodes…
Backup files de-configured
successfully.
The network configuration has
been cleaned up successfully.
Network Configuration clean
config END
Oracle Configuration Manager
clean START
OCM clean log file location :
/u01/app/oraInventory/logs//ocm_clean_2015-08-13_03-35-06-AM.log
Oracle Configuration Manager
clean END
Setting the force flag to false
Setting the force flag to cleanup
the Oracle Base
Oracle Universal Installer clean
START
Detach Oracle home
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ from the central inventory on the
local node : Done
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/machine-readable/automations/bp8-auto-inplace-rolling-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/machine-readable/automations/bp8-inplace-rolling-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/machine-readable/automations/bp8-out-of-place-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/machine-readable/automations/bp8-out-of-place-switchback.xml’.
The file is in use.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/machine-readable/automations’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/machine-readable’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/.tmp’.
The directory is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19/log.txt’.
The file is in use.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-46-19’.
The directory is not empty.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/machine-readable/automations/bp8-auto-inplace-rolling-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/machine-readable/automations/bp8-inplace-rolling-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/machine-readable/automations/bp8-out-of-place-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/machine-readable/automations/bp8-out-of-place-switchback.xml’.
The file is in use.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/machine-readable/automations’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/machine-readable’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/.tmp’.
The directory is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50/log.txt’.
The file is in use.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-12-14-56-50’.
The directory is not empty.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/machine-readable/automations/bp8-auto-inplace-rolling-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/machine-readable/automations/bp8-inplace-rolling-automation.xml’.
The file is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/machine-readable/automations/bp8-out-of-place-automation.xml’.
The file is in use.
Failed to delete the file ‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/machine-readable/automations/bp8-out-of-place-switchback.xml’.
The file is in use.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/machine-readable/automations’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/machine-readable’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/.tmp’.
The directory is in use.
Failed to delete the file
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29/log.txt’.
The file is in use.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan/2011-08-15-07-46-29’.
The directory is not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs/oplan’. The directory is
not empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1/cfgtoollogs’. The directory is not
empty.
Failed to delete the directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’. The directory is not empty.
Delete directory ‘/u01/app/oracle/product/11.2.0.2/dbhome_1’
on the local node : Failed <<<<
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on local node. The directory is in use by
Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
Detach Oracle home ‘/u01/app/oracle/product/11.2.0.2/dbhome_1’
from the central inventory on the remote nodes ‘dm01db04,dm01db07,dm01db02,dm01db06,dm01db03,dm01db08,dm01db05’
: Done
Delete directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ on the remote nodes ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
: Done
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on node ‘dm01db04’. The directory is in
use by Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
The Oracle Base directory ‘/u01/app/oracle’
will not be removed on node ‘dm01db07’. The directory is in use by Oracle Home
‘/u01/app/oracle/product/10.2.0/agent10g’.
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on node ‘dm01db02’. The directory is in
use by Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on node ‘dm01db06’. The directory is in
use by Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on node ‘dm01db03’. The directory is in
use by Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on node ‘dm01db08’. The directory is in
use by Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
The Oracle Base directory
‘/u01/app/oracle’ will not be removed on node ‘dm01db05’. The directory is in
use by Oracle Home ‘/u01/app/oracle/product/10.2.0/agent10g’.
Oracle Universal Installer
cleanup was successful.
Oracle Universal Installer clean
END
## [START] Oracle install clean
##
Clean install operation removing
temporary directory ‘/tmp/deinstall2015-08-13_03-34-40AM’ on node ‘dm01db01’
Clean install operation removing
temporary directory ‘/tmp/deinstall2015-08-13_03-34-40AM’ on node ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
## [END] Oracle install clean ##
######################### CLEAN
OPERATION END #########################
####################### CLEAN
OPERATION SUMMARY #######################
Cleaning the config for CCR
Cleaning the CCR configuration by
executing its binaries
CCR clean is finished
Successfully detached Oracle home
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ from the central inventory on the
local node.
Failed to delete directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ on the local node.
Successfully detached Oracle home
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ from the central inventory on the
remote nodes ‘dm01db04,dm01db07,dm01db02,dm01db06,dm01db03,dm01db08,dm01db05’.
Successfully deleted directory
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ on the remote nodes ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’.
Oracle Universal Installer
cleanup was successful.
Oracle deinstall tool successfully
cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL
& DECONFIG TOOL END #############
Remove the directories if not
removed by the deinstall utility
orcl1@dm01db01-/u01/app/oracle/software/deinstall:
orcl1@dm01db01-/u01/app/oracle/product/11.2.0.2:
su – root
Password:
[root@dm01db01 ~]# cd
/u01/app/oracle/product/11.2.0.2
[root@dm01db01 11.2.0.2]# ls -ltr
total 4
drwxr-xr-x 3 oracle oinstall 4096
Aug 13 03:36 dbhome_1
[root@dm01db01 11.2.0.2]# du -sh dbhome_1/
276K    dbhome_1/
[root@dm01db01 11.2.0.2]# rm -rf dbhome_1/
[root@dm01db01 11.2.0.2]# cd ..
[root@dm01db01 product]# rmdir
11.2.0.2/

Deinstall Grid Home

Here we deinstalling GRID
Home:  /u01/app/11.2.0.2/grid_1/
Replace the location with GRID
Home location you are deinstalling.
[root@dm01db01 ~]# cd
/u01/app/11.2.0.2/grid_1

[root@dm01db01 grid_1]# dcli -l
root -g ~/dbs_group chmod -R 755 /u01/app/11.2.0.2/grid_1

[root@dm01db01 grid_1]# dcli -l
root -g ~/dbs_group chown -R oracle /u01/app/11.2.0.2/grid_1

[root@dm01db01 grid_1]# cd ..

[root@dm01db01 11.2.0.2]# ls -l
total 4763768
drwxr-xr-x 72 oracle
oinstall       4096 Aug 22  2012 grid_1
[root@dm01db01 11.2.0.2]# dcli -l
root -g ~/dbs_group chown oracle /u01/app/11.2.0.2/grid_1
[root@dm01db01 11.2.0.2]# ls -l
total 4763768
drwxr-xr-x 72 oracle
oinstall       4096 Aug 22  2012 grid_1
Navigate to deinstall directory
and perform a deinstall check only. The –checkonly option we will only perform
a check without deinstalling the software.
oracle@dm01db01-/home/oracle:$  cd /u01/app/oracle/software/deinstall

oracle@dm01db01-/u01/app/oracle/software/deinstall:$
 ./deinstall -checkonly -home
/u01/app/11.2.0.2/grid_1/
Location of logs /u01/app/oraInventory/logs/
############ ORACLE DEINSTALL
& DECONFIG TOOL START ############
######################### CHECK
OPERATION START #########################
## [START] Install check
configuration ##
The deinstall tool cannot
determine the home type needed to deconfigure the selected home.  Please select the type of Oracle home you are
trying to deinstall.
Single Instance database – Enter
1
Real Application Cluster database
– Enter 2
Grid Infrastructure for a cluster
– Enter 3
Grid Infrastructure for a stand-alone
server – Enter 4
Client Oracle Home – Enter 5
Transparent Gateways Oracle Home
– Enter 6
3
The product version number of the
specified home cannot be determined. Is the product version at least 11.2.0.1.0
(y – yes, n – no)? [n]
y
Specify a comma-separated list of
nodes on which to perform the deinstallation task:dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Checking for existence of the
Oracle home location /u01/app/11.2.0.2/grid_1
Oracle Home type selected for
deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for
deinstall is:
Checking for existence of central
inventory location /u01/app/oraInventory
Checking for existence of the
Oracle Grid Infrastructure home /u01/app/11.2.0.4/grid
The following nodes are part of
this cluster: dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Checking for sufficient temp
space availability on node(s) : ‘dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
## [END] Install check
configuration ##
Traces log file:
/u01/app/oraInventory/logs//crsdc.log
Network Configuration check
config START
Network de-configuration trace
file location: /u01/app/oraInventory/logs/netdc_check2015-08-13_03-54-29-AM.log
Network Configuration check
config END
Asm Check Configuration START
ASM de-configuration trace file
location: /u01/app/oraInventory/logs/asmcadc_check2015-08-13_03-54-30-AM.log
ASM was not detected in the
Oracle Home
######################### CHECK
OPERATION END #########################
####################### CHECK
OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home
is: /u01/app/11.2.0.4/grid
The cluster node(s) on which the
Oracle home deinstallation will be performed are:dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Oracle Home selected for
deinstall is: /u01/app/11.2.0.2/grid_1
Inventory Location where the
Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is
NOT a configured Grid Infrastructure home (/u01/app/11.2.0.4/grid)
ASM was not detected in the
Oracle Home
A log of this session will be
written to:
‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-52-24-AM.out’
Any error messages from this
session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-52-24-AM.err’
############# ORACLE DEINSTALL
& DECONFIG TOOL END #############
Now perform the deinstall using
the following command.
orcl1@dm01db01-/u01/app/oracle/software/deinstall:
./deinstall -home /u01/app/11.2.0.2/grid_1/
Location of logs
/u01/app/oraInventory/logs/
############ ORACLE DEINSTALL
& DECONFIG TOOL START ############
######################### CHECK
OPERATION START #########################
## [START] Install check
configuration ##
The deinstall tool cannot
determine the home type needed to deconfigure the selected home.  Please select the type of Oracle home you are
trying to deinstall.
Single Instance database – Enter
1
Real Application Cluster database
– Enter 2
Grid Infrastructure for a cluster
– Enter 3
Grid Infrastructure for a
stand-alone server – Enter 4
Client Oracle Home – Enter 5
Transparent Gateways Oracle Home
– Enter 6
3
The product version number of the
specified home cannot be determined. Is the product version at least 11.2.0.1.0
(y – yes, n – no)? [n]
y
Specify a comma-separated list of
nodes on which to perform the deinstallation task:dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Checking for existence of the
Oracle home location /u01/app/11.2.0.2/grid_1
Oracle Home type selected for
deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for
deinstall is:
Checking for existence of central
inventory location /u01/app/oraInventory
Checking for existence of the
Oracle Grid Infrastructure home /u01/app/11.2.0.4/grid
The following nodes are part of
this cluster: dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Checking for sufficient temp
space availability on node(s) : ‘dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
## [END] Install check
configuration ##
Traces log file:
/u01/app/oraInventory/logs//crsdc.log
Network Configuration check
config START
Network de-configuration trace
file location: /u01/app/oraInventory/logs/netdc_check2015-08-13_03-56-28-AM.log
Network Configuration check
config END
Asm Check Configuration START
ASM de-configuration trace file
location: /u01/app/oraInventory/logs/asmcadc_check2015-08-13_03-56-29-AM.log
ASM was not detected in the
Oracle Home
######################### CHECK
OPERATION END #########################
####################### CHECK
OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home
is: /u01/app/11.2.0.4/grid
The cluster node(s) on which the
Oracle home deinstallation will be performed are:dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Oracle Home selected for
deinstall is: /u01/app/11.2.0.2/grid_1
Inventory Location where the
Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is
NOT a configured Grid Infrastructure home (/u01/app/11.2.0.4/grid)
ASM was not detected in the
Oracle Home
Do you want to continue (y – yes,
n – no)? [n]: y
A log of this session will be
written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-56-01-AM.out’
Any error messages from this
session will be written to:
‘/u01/app/oraInventory/logs/deinstall_deconfig2015-08-13_03-56-01-AM.err’
######################## CLEAN
OPERATION START ########################
ASM de-configuration trace file
location: /u01/app/oraInventory/logs/asmcadc_clean2015-08-13_03-56-47-AM.log
ASM Clean Configuration END
Network Configuration clean
config START
Network de-configuration trace
file location: /u01/app/oraInventory/logs/netdc_clean2015-08-13_03-56-47-AM.log
De-configuring Naming Methods
configuration file on all nodes…
Naming Methods configuration file
de-configured successfully.
De-configuring Local Net Service
Names configuration file on all nodes…
Local Net Service Names configuration
file de-configured successfully.
De-configuring Directory Usage
configuration file on all nodes…
Directory Usage configuration
file de-configured successfully.
De-configuring backup files on
all nodes…
Backup files de-configured
successfully.
The network configuration has
been cleaned up successfully.
Network Configuration clean
config END
Setting the force flag to false
Setting the force flag to cleanup
the Oracle Base
Oracle Universal Installer clean
START
Failed to delete the directory
‘/u01/app/11.2.0.2/grid_1’. The directory is in use.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the local node : Failed <<<<
Failed to delete the directory
‘/u01/app/11.2.0.2/grid_1’. The directory is in use.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the local node : Failed <<<<
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
: Failed <<<<
Could not remove listed
directories based on ‘/tmp/OraInstall2015-08-13_03-56-54-AM/installRemoveDirFile.lst’
from nodes ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08′.
[/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied/bin/rm: cannot remove directory `/u01/app/11.2.0.2/grid_1/’: Permission
denied]
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db02’ : Failed
<<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db02’.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db03’ : Failed
<<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db03’.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db04’ : Failed
<<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db04’.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db05’ : Failed
<<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db05’.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db06’ : Failed
<<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db06’.
Delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db07’ : Failed
<<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db07’.
Delete directory ‘/u01/app/11.2.0.2/grid_1’
on the remote nodes ‘dm01db08’ : Failed <<<<
The directory ‘/u01/app/11.2.0.2/grid_1’
could not be deleted on the nodes ‘dm01db08’.
Oracle Universal Installer
cleanup completed with errors.
Oracle Universal Installer clean
END
## [START] Oracle install clean
##
Clean install operation removing
temporary directory ‘/tmp/deinstall2015-08-13_03-56-01AM’ on node ‘dm01db01’
Clean install operation removing
temporary directory ‘/tmp/deinstall2015-08-13_03-56-01AM’ on node ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’
## [END] Oracle install clean ##
######################### CLEAN
OPERATION END #########################
####################### CLEAN
OPERATION SUMMARY #######################
The home being deconfigured is
NOT a configured Grid Infrastructure home (/u01/app/11.2.0.4/grid)
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the local node.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the local node.
Failed to delete directory ‘/u01/app/11.2.0.2/grid_1’
on the remote nodes ‘dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db02’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db03’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db04’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db05’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db06’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db07’.
Failed to delete directory
‘/u01/app/11.2.0.2/grid_1’ on the remote nodes ‘dm01db08’.
Oracle Universal Installer
cleanup completed with errors.
For complete clean up of Oracle
Clusterware software from the system, deinstall the following old clusterware
home(s). Refer to Clusterware Install guide of respective old release for
details.
    /u01/app/11.2.0.3/grid on nodes : dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08
Oracle deinstall tool
successfully cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL
& DECONFIG TOOL END #############

Post De-install Steps
  • Verify the OraInventory is update
    and OLD Oracle Homes are removed.

orcl1@dm01db01-/u01/app/11.2.0.2/grid_1:
dcli -g ~/dbs_group -l oracle -s “-q” “grep
‘/u01/app/oracle/product/11.2.0.2/dbhome_1’ /u01/app/oraInventory/ContentsXML/inventory.xml”

orcl1@dm01db01-/u01/app/11.2.0.2/grid_1:
dcli -g ~/dbs_group -l oracle -s “-q” “grep ‘/u01/app/11.2.0.2/grid_1’
/u01/app/oraInventory/ContentsXML/inventory.xml”

  • Verify the directories are deleted;
    if not manually delete them carefully.

 orcl1@dm01db01-/u01/app/oracle/software/deinstall:
dcli -g ~/dbs_group -l oracle -s “-q” ‘ls -l
/u01/app/oracle/product/11.2.0.2’
dm01db01: ls:
/u01/app/oracle/product/11.2.0.2: No such file or directory
dm01db02: total 0
dm01db03: total 0
dm01db04: total 0
dm01db05: total 0
dm01db06: total 0
dm01db07: total 0
dm01db08: total 0
  
orcl1@dm01db01-/u01/app/oracle/software/deinstall:
dcli -g ~/dbs_group -l oracle -s “-q” ‘ls -l /u01/app/11.2.0.2’
dm01db01: total 4763768
dm01db01: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:57 grid_1
dm01db02: total 4
dm01db02: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
dm01db03: total 4
dm01db03: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
dm01db04: total 4
dm01db04: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
dm01db05: total 4
dm01db05: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
dm01db06: total 4
dm01db06: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
dm01db07: total 4
dm01db07: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
dm01db08: total 4
dm01db08: drwxr-xr-x 2 oracle
oinstall 4096 Aug 13 03:58 grid_1
orcl1@dm01db01-/u01/app/11.2.0.2/grid_1:
su – root
[root@dm01db01 ~]#  dcli -g ~/dbs_group -l root -s “-q”
‘cd /u01/app/; rmdir 11.2.0.2’
[root@dm01db01 ~]# dcli -g
~/dbs_group -l root -s “-q” ‘ls -l /u01/app/11.2.0.2’
dm01db01: total 4763764
dm01db02: total 0
dm01db03: total 0
dm01db04: total 0
dm01db05: total 0
dm01db06: total 0
dm01db07: total 0
dm01db08: total 0
[root@dm01db01 ~]# dcli -g
~/dbs_group -l root -s “-q” ‘cd /u01/app/; rmdir 11.2.0.2’
[root@dm01db01 ~]# dcli -g
~/dbs_group -l root -s “-q” ‘cd /u01/app/; ls -l 11.2.0.2’
dm01db01: ls: 11.2.0.2: No such
file or directory
dm01db02: ls: 11.2.0.2: No such
file or directory
dm01db03: ls: 11.2.0.2: No such
file or directory
dm01db04: ls: 11.2.0.2: No such
file or directory
dm01db05: ls: 11.2.0.2: No such
file or directory
dm01db06: ls: 11.2.0.2: No such
file or directory
dm01db07: ls: 11.2.0.2: No such
file or directory
dm01db08: ls: 11.2.0.2: No such
file or directory
  •  Verify the free space available
    after de-install completed.

[root@dm01db01 ~]# dcli -g
~/dbs_group -l root ‘df -h /u01’
dm01db01: Filesystem            Size  Used Avail Use% Mounted on
dm01db01: /dev/sda3             193G   81G 
103G  45% /u01
dm01db02: Filesystem            Size  Used Avail Use% Mounted on
dm01db02: /dev/sda3             193G   48G 
136G  26% /u01
dm01db03: Filesystem            Size  Used Avail Use% Mounted on
dm01db03: /dev/sda3             193G   48G 
136G  27% /u01
dm01db04: Filesystem            Size  Used Avail Use% Mounted on
dm01db04: /dev/sda3             193G   58G 
126G  32% /u01
dm01db05: Filesystem            Size  Used Avail Use% Mounted on
dm01db05: /dev/sda3             193G   47G 
137G  26% /u01
dm01db06: Filesystem            Size  Used Avail Use% Mounted on
dm01db06: /dev/sda3             193G   63G 
121G  35% /u01
dm01db07: Filesystem            Size  Used Avail Use% Mounted on
dm01db07: /dev/sda3             193G   42G 
142G  23% /u01
dm01db08: Filesystem            Size  Used Avail Use% Mounted on
dm01db08: /dev/sda3             193G   54G 
130G  30% /u01

IMPORTANT NOTES
  • For 12.1.0.2.0, please be aware
    of the known issue with oraInst.loc discussed in “Deinstall Unable to
    Determine Product Version Number (Doc ID 1966643.1)”
  • Oracle 12c Release 1 (12.1)
    deinstall tool from Installation Media should not be used to deinstall earlier
    releases of Oracle Home as it is not supported.
  • The deinstall tool from Oracle
    Home should be used only if the Oracle Database 12.1 Software is being
    successfully Installed.
  • For Incomplete or Failed
    Software Installation, you must only use the deinstall tool from Installation
    Media.

Conclusion
In this article we have seen how to de-install Oracle Grid and RDBMS software. The external deinstall utility for 11gR2 and built in De-install utility makes the process easier to remove the unused or old Oracle Homes.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *