30 January 2015

deinstall obsolete Oracle Home tries to remove LISTENER

This post describes, that a listener can be removed by accident if you remove an obsolete Oracle home.


After upgrading a single database from 11.2.0.3 (dbhome_1) to 11.2.0.4 (dbhome_2), the old 11.2.0.3 home becomes obsolete. The listener has already been moved to the new home as well.

oracle@demohost01:/home/oracle> which lsnrctl
/opt/oracle/product/11.2.0/dbhome_2/bin/lsnrctl

oracle@demohost01:/home/oracle> ps -ef | grep LISTENER
oracle   10305     1  0 Jan29 ?        00:00:13 /opt/oracle/product/11.2.0/dbhome_2/bin/tnslsnr LISTENER -inherit
oracle   12642  9408  0 08:30 pts/0    00:00:00 grep LISTENER

From your home directory, deinstall (on Linux) as follows:

oracle@demohost01:/opt/oracle/product/11.2.0/dbhome_1/deinstall/deinstall

Now some checks are performed.

oracle@demohost01:/home/oracle> /opt/oracle/product/11.2.0/dbhome_1/deinstall/deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /opt/oracle/oraInventory/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################### CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /opt/oracle/product/11.2.0/dbhome_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /opt/oracle
Checking for existence of central inventory location /opt/oracle/oraInventory
Checking for sufficient temp space availability on node(s) : 'demohost01'

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /opt/oracle/oraInventory/logs/netdc_check2015-01-30_08-28-54-AM.log

Specify all Single Instance listeners that are to be de-configured [LISTENER]:

WAIT !! This is strange…. The listener is running on the new home. So why is it trying to deinstall it? Press ctrl-C to abort this deinstallation!!

Check if there is still a copy of the old listener.ora in the network/admin folder:

oracle@demohost01:/home/oracle> ls -l /opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
-rw-------. 1 oracle oinstall 568 Sep 20  2013 /opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

If we move or rename this to listener.ora_old, the de-installation runs fine.

oracle@demohost01:/opt/oracle/product/11.2.0/dbhome_1/network/admin> mv listener.ora listener.ora_old

So try again:

oracle@demohost01:/home/oracle> /opt/oracle/product/11.2.0/dbhome_1/deinstall/deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /opt/oracle/oraInventory/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################### CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /opt/oracle/product/11.2.0/dbhome_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /opt/oracle
Checking for existence of central inventory location /opt/oracle/oraInventory
Checking for sufficient temp space availability on node(s) : 'demohost01'

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /opt/oracle/oraInventory/logs/netdc_check2015-01-30_08-40-09-AM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /opt/oracle/oraInventory/logs/databasedc_check2015-01-30_08-40-09-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 []:

Hit Enter here, there are no databases found active on this Oracle Home.

Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /opt/oracle/oraInventory/logs/emcadc_check2015-01-30_08-40-28-AM.log

Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /opt/oracle/oraInventory/logs//ocm_check3812.log
Oracle Configuration Manager check END

######################### CHECK OPERATION END #########################


####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /opt/oracle/product/11.2.0/dbhome_1
Inventory Location where the Oracle home registered is: /opt/oracle/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
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished
Do you want to continue (y - yes, n - no)? [n]: y

The y-response is entered manually, and then the process starts running.

A log of this session will be written to: '/opt/oracle/oraInventory/logs/deinstall_deconfig2015-01-30_08-40-06-AM.out'
Any error messages from this session will be written to: '/opt/oracle/oraInventory/logs/deinstall_deconfig2015-01-30_08-40-06-AM.err'

######################## CLEAN OPERATION START ########################

[ *** output removed, no errors ***]

######################### CLEAN OPERATION END #########################


####################### CLEAN OPERATION SUMMARY #######################
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
Successfully detached Oracle home '/opt/oracle/product/11.2.0/dbhome_1' from the central inventory on the local node.
Successfully deleted directory '/opt/oracle/product/11.2.0/dbhome_1' on the local node.
Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL & DECONFIG TOOL END #############