how to uninstall oracle 11gR2 ---> oracle introduced new concept Deinstall utility


Oracle deinstall utility was a new feature which was added as part of 11gr2 release. Now one cannot uninstall oracle home using $ORACLE_HOME/oui/bin/runInstaller GUI. We need to invoke a CLI deinstall present in $ORACLE_HOME/deinstall. This CLI ask few questions related to configuration and then will start DEINSTALL.
This deinstall utility is also available as a separate download from the OTN site.  We can download this file (eg: aix.ppc64_11gR2_deinstall.zip) & unzip it.
It will create following directory structure
http://oraclehandson.files.wordpress.com/2010/09/deinstall.jpg?w=360&h=362
Check the usage
$ deinstall
Location of logs /home/ora11gr2/logs/
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
Usage:
deinstall -home <Complete path of Oracle home>
                [ -silent ]
                [ -checkonly ]
                [ -local ]
                [ -paramfile <complete path of input parameter property file> ]
                [ -params <name1=value[ name2=value ...]> ]
                [ -o <complete path of directory for saving files> ]
                [ -help | -h: Type -h or -help to get more information on each of the above options. ]
Specify any of the above options.
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
Now to actually deinstall the ORACLE_HOME we can use
$ deinstall -home /oracle/11gr2
ORACLE_HOME = /oracle/11gr2
Location of logs /deinstall/logs/
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################## CHECK OPERATION START ########################
Install check configuration START
Checking for existence of the Oracle home location /oracle/11gr2
Oracle Home type selected for de-install is: SIDB
Oracle Base selected for de-install is: /oracle
Checking for existence of central inventory location /oraInventory
Install check configuration END
Network Configuration check config START
Network de-configuration trace file location: /deinstall/logs/netdc_check56407.log
Network Configuration check config END
Database Check Configuration START
Database de-configuration trace file location: /deinstall/logs/databasedc_check56408.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: /deinstall/logs/emcadc_check.log
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /deinstall/logs//ocm_check9598.log
Oracle Configuration Manager check END
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for de-install is: /oracle/11gr2
Inventory Location where the Oracle home registered is: /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
A log of this session will be written to: ‘/deinstall/logs/deinstall_deconfig2010-09-10_03-17-51-AM.out’
Any error messages from this session will be written to: ‘/deinstall/logs/deinstall_deconfig2010-09-10_03-17-51-AM.err’
######################## CLEAN OPERATION START ########################
Enterprise Manager Configuration Assistant START
EMCA de-configuration trace file location: /deinstall/logs/emcadc_clean.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: /deinstall/logs/databasedc_clean56409.log
Network Configuration clean config START
Network de-configuration trace file location: /deinstall/logs/netdc_clean56410.log
De-configuring backup files…
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 : /deinstall/logs//ocm_clean9598.log
Oracle Configuration Manager clean END
Oracle Universal Installer clean START
Detach Oracle home ‘/oracle/11gr2′ from the central inventory on the local node : Done
Delete directory ‘/oracle/11gr2′ on the local node : Done
Delete directory ‘/oraInventory’ on the local node : Done
Failed to delete the directory ‘/oracle’. The directory is in use.
Delete directory ‘/oracle’ on the local node : Failed <<<<
Oracle Universal Installer cleanup completed with errors.
Oracle Universal Installer clean END
Oracle install clean START
Clean install operation removing temporary directory ‘/tmp//install’ on node ‘node19′
Oracle install clean END
Moved default properties file /deinstall/response/deinstall_OraDb11g_home1.rsp as /deinstall/response/deinstall_OraDb11g_home1.rsp4
######################### 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 ‘/oracle/11gr2′ from the central inventory on the local node.
Successfully deleted directory ‘/oracle/11gr2′ on the local node.
Successfully deleted directory ‘/oraInventory’ on the local node.
Failed to delete directory ‘/oracle’ on the local node.
Oracle Universal Installer cleanup completed with errors.
Run ‘rm -rf /etc/oraInst.loc’ as root on node(s) ‘node19′ at the end of the session.
Oracle install successfully cleaned up the temporary directories.
#######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
We can check deinstall logs at /deinstall/logs
-rw-r–r–    1 ora11gr2 oinstall        523 Sep 10 03:17 deinstall_deconfig2010-09-10_03-17-42-AM.out
-rw-r–r–    1 ora11gr2 oinstall          0 Sep 10 03:17 deinstall_deconfig2010-09-10_03-17-42-AM.err
-rw-r–r–    1 ora11gr2 oinstall          0 Sep 10 03:17 deinstall_deconfig2010-09-10_03-17-51-AM.err
-rw-r–r–    1 ora11gr2 oinstall       6850 Sep 10 03:17 netdc_check56407.log
-rw-r–r–    1 ora11gr2 oinstall       1000 Sep 10 03:17 ocm_check9598.log
-rw-r–r–    1 ora11gr2 oinstall       1985 Sep 10 03:17 emcadc_check.log
-rw-r–r–    1 ora11gr2 oinstall       7650 Sep 10 03:17 databasedc_check56408.log
-rw-r–r–    1 ora11gr2 oinstall        407 Sep 10 03:18 ocm_clean9598.log
-rw-r–r–    1 ora11gr2 oinstall       2958 Sep 10 03:18 netdc_clean56410.log
-rw-r–r–    1 ora11gr2 oinstall       1561 Sep 10 03:18 emcadc_clean.log
-rw-r–r–    1 ora11gr2 oinstall        722 Sep 10 03:18 databasedc_clean56409.log
-rw-r–r–    1 ora11gr2 oinstall       4600 Sep 10 03:21 deinstall_deconfig2010-09-10_03-17-51-AM.out
-rw——-    1 ora11gr2 oinstall       4990 Sep 10 03:21 Cleanup2010-09-10_03-18-00-AM.log
 1. So is it mandatory to download this utility?
It is not necessary to download deinstall utility from OTN. Oracle 11.2 software has deinstall utility is under $ORACLE_HOME/deinstall directory.
2. If it is there in the ORACLE_HOME, then what this download is all about?
If we are invoking this utility from ORACLE_HOME, all the files won’t be deleted correctly. So, ideally we need this utility somewhere outside ORACLE_HOME.

Comments

Popular posts from this blog

Useful OEM Queries to get Target details from OEM Repository

WARNING: Subscription for node down event still pending' in Listener Log

ORA-65139: Mismatch between XML metadata file and data file