Tuesday, February 5, 2019

Deinstalling or Removing Oracle Software


We need to use “deinstall” utility to remove Oracle software from a system. In the following I will show how to deinstall Oracle grid infrastructure software. If you have an Oracle RDBMS home dependent on the GI home, then you should deinstall RDBMS software before deinstaling GI software. Process of deinstalling RDBMS home is similar to the deinstallation of grid infrastructure software.

Initiate deinstall utility as follows, and provide inputs to the prompts. I have highlighted prompts in red color bellow.
[grid@salman11 ~]$ $ORACLE_HOME/deinstall/deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2017-06-02_12-16-36PM/logs/

############ ORACLE DECONFIG TOOL START ############


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


Checking for existence of the Oracle home location /u01/app/12.2.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /u01/app/12.2.0
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/12.2.0/grid

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2017-06-02_12-16-36PM/logs//crsdc_2017-06-02_12-17-07-PM.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2017-06-02_12-16-36PM/logs/netdc_check2017-06-02_12-17-08-PM.log

Specify all Oracle Restart enabled listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2017-06-02_12-16-36PM/logs/asmcadc_check2017-06-02_12-17-18-PM.log

Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/12.2.0/grid.
ASM Diagnostic Destination : /u01/app/12.2.0
ASM Diskgroups : +DATA
ASM diskstring : ORCL:*,AFD:*
Diskgroups will be dropped and all ASM filter driver labels will be cleared
De-configuring ASM will drop all the diskgroups and their contents at cleanup time. Also ASM filter driver labels will be cleared. This will affect all of the databases and ACFS that use this ASM instance(s).
 If you want to retain the existing diskgroups and associated ASM filter driver labels or if any of the information detected is incorrect, you can modify by entering 'y'. Do you  want to modify above information (y|n) [n]:
Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2017-06-02_12-16-36PM/logs/databasedc_check2017-06-02_12-17-43-PM.log

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/12.2.0/grid
Oracle Home selected for deinstall is: /u01/app/12.2.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2017-06-02_12-16-36PM/logs/deinstall_deconfig2017-06-02_12-17-04-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2017-06-02_12-16-36PM/logs/deinstall_deconfig2017-06-02_12-17-04-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2017-06-02_12-16-36PM/logs/databasedc_clean2017-06-02_12-18-13-PM.log
ASM de-configuration trace file location: /tmp/deinstall2017-06-02_12-16-36PM/logs/asmcadc_clean2017-06-02_12-18-13-PM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2017-06-02_12-16-36PM/logs/netdc_clean2017-06-02_12-18-47-PM.log

De-configuring Oracle Restart enabled listener(s): LISTENER

De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Listener stopped successfully.
    Unregistering listener: LISTENER
    Listener unregistered successfully.
    Deleting listener: LISTENER
    Listener deleted successfully.
Listener de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


---------------------------------------->

Run the following command as the root user or the administrator on node "salman11".

/u01/app/12.2.0/grid/crs/install/roothas.sh -force  -deconfig -paramfile "/tmp/deinstall2017-06-02_12-16-36PM/response/deinstall_OraGI12Home1.rsp"

Press Enter after you finish running the above commands

<----------------------------------------





Leave deinstall windows open and log in as root in another window and execute the command highlighted above

[root@salman11 ~]# /u01/app/12.2.0/grid/crs/install/roothas.sh -force  -deconfig -paramfile "/tmp/deinstall2017-06-02_12-16-36PM/response/deinstall_OraGI12Home1.rsp"
Using configuration parameter file: /tmp/deinstall2017-06-02_12-16-36PM/response/deinstall_OraGI12Home1.rsp
The log of current session can be found at:
  /tmp/deinstall2017-06-02_12-16-36PM/logs/hadeconfig.log
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'salman11'
CRS-2673: Attempting to stop 'ora.evmd' on 'salman11'
CRS-2677: Stop of 'ora.evmd' on 'salman11' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'salman11'
CRS-2677: Stop of 'ora.cssd' on 'salman11' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'salman11'
CRS-2677: Stop of 'ora.driver.afd' on 'salman11' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'salman11' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2017/06/02 12:20:35 CLSRSC-337: Successfully deconfigured Oracle Restart stack
[root@salman11 ~]#

After the completion of above stem, press <Enter> in the window where deinstallation is running to continue the process.
######################### DECONFIG CLEAN OPERATION END #########################


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER
Oracle Restart was already stopped and de-configured on node "salman11"
Oracle Restart is stopped and de-configured successfully.
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2017-06-02_12-16-36PM/response/deinstall_2017-06-02_12-17-04-PM.rsp
Location of logs /tmp/deinstall2017-06-02_12-16-36PM/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2017-06-02_12-16-36PM/logs/deinstall_deconfig2017-06-02_12-17-04-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2017-06-02_12-16-36PM/logs/deinstall_deconfig2017-06-02_12-17-04-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to salman11
Setting CRS_HOME to true
Setting oracle.installer.invPtrLoc to /tmp/deinstall2017-06-02_12-16-36PM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

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/12.2.0/grid' from the central inventory on the local node : Done

Delete directory '/u01/app/12.2.0/grid' on the local node : Done

Delete directory '/u01/app/oraInventory' on the local node : Done

Delete directory '/u01/app/12.2.0' on the local node : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##


## [END] Oracle install clean ##


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


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/app/12.2.0/grid' from the central inventory on the local node.
Successfully deleted directory '/u01/app/12.2.0/grid' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Successfully deleted directory '/u01/app/12.2.0' on the local node.
Oracle Universal Installer cleanup was successful.


Run 'rm -r /etc/oraInst.loc' as root on node(s) 'salman11' at the end of the session.

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'salman11' at the end of the session.
Run 'rm -r /etc/oratab' as root on node(s) 'salman11' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

2 comments:

  1. Do you want to continue (y - yes, n - no)? [n]: y

    Any way to have it not prompt for Y or N? just what it Y :-)

    I only get this prompt but i need it to be automated since its a deinstall from SCCM.

    ReplyDelete
    Replies
    1. In that case you would need to automate it using your own shell script and calling deinstall from your shell script and pass response (Y/N) from your script, in order to make it fully automated.

      Delete

Popular Posts - All Times