Infrastructure at your Service

Grégory Steulet

Oracle Database 12c New Features: Uninstaller encapsulated into installation media

Among the Oracle 12c New Features, there is the addition of an uninstall tool encapsulated in the Oracle database binaries. You do not need to download the deinstallation tool for Oracle products anymore (deinstall utility). This blog posting features an overview of this tool and its functionnalities.

Uninstalling Oracle 12c products

There are two possibilities if you want to uninstall Oracle 12c products (Oracle database, Oracle Grid infrastructure or Oracle client):

  1. Running the deinstallation tool with the runInstaller command using the parameters –desinstall and –home from ORACLE_HOME/oui/bin/
  2. Using the deinstallation tool which is also available as a separate command in the ORACLE_HOME deinstall directory after the installation of the Oracle product. It is located in ORACLE_HOME/deinstall. In this posting I am going to speak about the second solution.

This new deinstallation command line tool uses information gathered from the environment and information provided (if necessary) in order to create a parameter file. It is also possible to use the template parameter file located under ORACLE_HOME/deinstall/response. The deinstallation tool automatically stops Oracle software, and removes Oracle software and configuration files on the operating system.

As the Oracle documentation explains in the documentation, it is important to take into consideration the following:

“If the oraInventory contains no other registrered home besides the home that you are deconfiguring and removing, then the deinstall command 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 deinstall command deletes this data.”
Using the deinstallation tool is a straightforward process. You simply have to execute the deinstall tool from ORACLE_HOME/deinstall directory a demonstrated below.

Testing the uninstall feature

Let’s test this deinstallation tool with the command deinstall from $ORACLE_HOME/deinstall:

-bash-3.2$ cd /u00/app/oracle/product/12.1.0/db_0_1/deinstall/
-bash-3.2$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u00/app/oraInventory/logs/


############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################### CHECK OPERATION START #########################

## [START] Install check configuration ##
Checking for existence of the Oracle home location /u00/app/oracle/product/12.1.0/db_0_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u00/app/oracle
Checking for existence of central inventory location /u00/app/oraInventory
Checking for sufficient temp space availability on node(s) : 'vmtestoel01'
## [END] Install check configuration ##

Network Configuration check config START
Network de-configuration trace file location: /u00/app/oraInventory/logs/netdc_check2012-07-29_03-00-16-PM.log
Network Configuration check config END
 
Database Check Configuration START
Database de-configuration trace file location: /u00/app/oraInventory/logs/databasedc_check2012-07-29_03-00-17-PM.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
 
Oracle Configuration Manager check START
OCM check log file location : /u00/app/oraInventory/logs//ocm_check8060.log
Oracle Configuration Manager check END
######################### CHECK OPERATION END #########################

####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u00/app/oracle/product/12.1.0/db_0_1
Inventory Location where the Oracle home registered is: /u00/app/oraInventory
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: '/u00/app/oraInventory/logs/deinstall_deconfig2012-07-29_03-00-14-PM.out'
Any error messages from this session will be written to: '/u00/app/oraInventory/logs/deinstall_deconfig2012-07-29_03-00-14-PM.err'

######################## CLEAN OPERATION START ########################
Database de-configuration trace file location: /u00/app/oraInventory/logs/databasedc_clean2012-07-29_03-00-37-PM.log
Network Configuration clean config START
Network de-configuration trace file location: /u00/app/oraInventory/logs/netdc_clean2012-07-29_03-00-37-PM.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 : /u00/app/oraInventory/logs//ocm_clean8060.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 ‘/u00/app/oracle/product/12.1.0/db_0_1′ from the central inventory on the local node :Done
Delete directory ‘/u00/app/oracle/product/12.1.0/db_0_1′ on the local node : Done
The Oracle Base directory ‘/u00/app/oracle’ will not be removed on local node. The directory is not empty.
Oracle Universal Installer cleanup was successful.
Oracle Universal Installer clean END

## [START] Oracle install clean
##Clean install operation removing temporary directory ‘/tmp/deinstall2012-07-29_03-00-00PM’ on node ‘vmtestoel01′
## [END] Oracle install clean ##

######################### 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 ‘/u00/app/oracle/product/12.1.0/db_0_1′ from the central inventory on the local node.
Successfully deleted directory ‘/u00/app/oracle/product/12.1.0/db_0_1′ on the local node.
Oracle Universal Installer cleanup was successful.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############

Do not forget to remove the deinstallation script in /tmp.

In my case, the desinstallation directory in /tmp directory used about 500MB of disk space as presented below:

-bash-3.2$ du -hs /tmp/deinstall2012-07-29_02-58-14PM/
545M /tmp/deinstall2012-07-29_02-58-14PM/

 

It is possible to specify some options for the desinstallation tool. These options can be listed with the help option such as demonstrated below:

oracle@vmtestoel01:/u00/app/oracle/product/12.1.0/db_0_1/deinstall/ [] ./deinstall -help

deinstall
 [ -silent ]
 [ -checkonly ]
 [ -local ]
 [ -paramfile ]
 [ -params ]
 [ -o ]
 [ -tmpdir ]
 [ -logdir ]
 [ -help : Type -help to get more information on each of the above options. ]

 

Conclusion

Having the deinstallation tool encapsulated into the Oracle Installation Media is definitively an added value compared to the previous version. This tool is easy to use and allows configuring a parameter file in order to use it in a batch process. However, I have encountered strange problems with this tool in some specific context, such as demonstrated below. Unsetting the ORACLE_HOME solved the issue in my case.

Network de-configuration trace file location: /u00/app/oraInventory/logs/netdc_check2012-07-29_02-57-35-PM.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f923401f933, pid=27863, tid=1087699264
#
# JRE version: 6.0_31-b02
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.6-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libclntshcore.so.12.1+0x204933] long+0x33
#
# An error report file with more information is saved as:
# /tmp/deinstall2012-07-29_02-57-21PM/hs_err_pid27863.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

 

 

Leave a Reply


2 × seven =

Grégory Steulet
Grégory Steulet

Chief Financial Officer (CFO)