How to deinstall 12201 GRID HOME

Step by step procedure to deinstall 12201 GRID HOME.

It is mandatory activity for Oracle DBA to uninstall the old version if it is not in use . Otherwise there will be vulnerabilities in the software.

It is a two step process on two different putty sessions, Step 1 will be on 1st session, step 2 will be executed on 2nd putty session

Open two putty sessions with grid credentials

Server: ORA_SRVR
Path:/u00/grid/oracle/product/12201/grid

Step 1) Change directory to grid and run deinstall command

[oracle@ORA_SRVR grid]$
[oracle@ORA_SRVR grid]$ ./deinstall
-bash: ./deinstall: Is a directory
[oracle@ORA_SRVR grid]$
[oracle@ORA_SRVR grid]$
[oracle@ORA_SRVR grid]$ cd deinstall/
[oracle@ORA_SRVR deinstall]$
[oracle@ORA_SRVR deinstall]$
[oracle@ORA_SRVR deinstall]$ ./deinstall
Checking for required files and bootstrapping …
Please wait …
Location of logs /u00/app/oraInventory/logs/

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

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

Checking for existence of the Oracle home location /u00/grid/oracle/product/12201/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /u00/app/oracle
Checking for existence of central inventory location /u00/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u00/grid/oracle/product/19c/grid

## [END] Install check configuration ##

Traces log file: /u00/app/oraInventory/logs//crsdc_2022-06-15_01-07-16-PM.log

Network Configuration check config START

Network de-configuration trace file location: /u00/app/oraInventory/logs/netdc_check2022-06-15_01-07-16-PM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u00/app/oraInventory/logs/asmcadc_check2022-06-15_01-07-17-PM.log

ASM was not detected in the Oracle Home
Database Check Configuration START

Database de-configuration trace file location: /u00/app/oraInventory/logs/databasedc_check2022-06-15_01-07-18-PM.log

Database Check Configuration END

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

####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u00/grid/oracle/product/19c/grid
Oracle Home selected for deinstall is: /u00/grid/oracle/product/12201/grid
Inventory Location where the Oracle home registered is: /u00/app/oraInventory
The home being deconfigured is NOT a configured Grid Infrastructure home (/u00/grid/oracle/product/19c/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: ‘/u00/app/oraInventory/logs/deinstall_deconfig2022-06-15_01-07-15-PM.out’
Any error messages from this session will be written to: ‘/u00/app/oraInventory/logs/deinstall_deconfig2022-06-15_01-07-15-PM.err’

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u00/app/oraInventory/logs/databasedc_clean2022-06-15_01-08-15-PM.log
ASM de-configuration trace file location: /u00/app/oraInventory/logs/asmcadc_clean2022-06-15_01-08-15-PM.log
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /u00/app/oraInventory/logs/netdc_clean2022-06-15_01-08-15-PM.log

De-configuring Listener configuration file…
Listener configuration file 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 “ORA_SRVR”.

/u00/grid/oracle/product/12201/grid/crs/install/roothas.sh -unlock -hahome /u00/grid/oracle/product/12201/grid -paramfile “/tmp/deinstall2022-06-15_01-02-45PM/response/deinstall_OraGI12Home1.rsp”

Press Enter after you finish running the above commands

<—————————————-

Step 2) Interactively it will ask to run the command as root user

Connect to root user on new putty session

And execute below command and press ENTER key to come back to original putty session 
==========================
/u00/grid/oracle/product/12201/grid/crs/install/roothas.sh -unlock -hahome /u00/grid/oracle/product/12201/grid -paramfile “/tmp/deinstall2022-06-15_01-02-45PM/response/deinstall_OraGI12Home1.rsp”

[root@ORA_SRVR ~]# /u00/grid/oracle/product/12201/grid/crs/install/roothas.sh -unlock -hahome /u00/grid/oracle/product/12201/grid -paramfile “/tmp/deinstall2022-06-15_01-02-45PM/response/deinstall_OraGI12Home1.rsp”
Using configuration parameter file: /tmp/deinstall2022-06-15_01-02-45PM/response/deinstall_OraGI12Home1.rsp
The log of current session can be found at:
/u00/app/oraInventory/logs/haunlock__2022-06-15_01-09-43PM.log
2022/06/15 13:09:55 CLSRSC-347: Successfully unlock /u00/grid/oracle/product/12201/grid
[root@ORA_SRVR ~]#

 

Next output follows as below on session 1:

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

####################### DECONFIG CLEAN OPERATION SUMMARY #######################
The home being deconfigured is NOT a configured Grid Infrastructure home (/u00/grid/oracle/product/19c/grid)
Oracle Restart was successfully unlocked on node “ORA_SRVR”.
#######################################################################

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

Using properties file /tmp/deinstall2022-06-15_01-02-45PM/response/deinstall_2022-06-15_01-07-15-PM.rsp
Location of logs /u00/app/oraInventory/logs/

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

 

 

####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: ‘/u00/app/oraInventory/logs/deinstall_deconfig2022-06-15_01-07-15-PM.out’
Any error messages from this session will be written to: ‘/u00/app/oraInventory/logs/deinstall_deconfig2022-06-15_01-07-15-PM.err’

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to ORA_SRVR
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2022-06-15_01-02-45PM/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 ‘/u00/grid/oracle/product/12201/grid’ from the central inventory on the local node : Done

Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/driver/2021-04-28-17-20-05/machine-readable’. Either user has no permission to delete or it is in use.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/driver/2021-04-28-17-20-05/.tmp’. Either user has no permission to delete or it is in use.
Failed to delete the file ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/driver/2021-04-28-17-20-05/log.txt’. Either the file is in use or there are not enough permissions to delete the file.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/driver/2021-04-28-17-20-05’. The directory is not empty.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/driver’. The directory is not empty.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/2021-04-28-17-20-16/machine-readable’. Either user has no permission to delete or it is in use.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/2021-04-28-17-20-16/.tmp’. Either user has no permission to delete or it is in use.
Failed to delete the file ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/2021-04-28-17-20-16/log.txt.lck’. Either the file is in use or there are not enough permissions to delete the file.
Failed to delete the file ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/2021-04-28-17-20-16/log.txt’. Either the file is in use or there are not enough permissions to delete the file.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb/2021-04-28-17-20-16’. The directory is not empty.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs/opatchautodb’. The directory is not empty.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid/cfgtoollogs’. The directory is not empty.
Failed to delete the directory ‘/u00/grid/oracle/product/12201/grid’. The directory is not empty.
Delete directory ‘/u00/grid/oracle/product/12201/grid’ on the local node : Failed <<<<

The Oracle Base directory ‘/u00/app/oracle’ will not be removed on local node. The directory is in use by Oracle Home ‘/u00/app/oracle/product/odi_dev/odi_12_2_1’.

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 ‘/u00/grid/oracle/product/12201/grid’ from the central inventory on the local node.
Failed to delete directory ‘/u00/grid/oracle/product/12201/grid’ on the local node.
Oracle Universal Installer cleanup was successful.

Review the permissions and contents of ‘/u00/app/oracle’ on nodes(s) ‘ORA_SRVR’.
If there are no Oracle home(s) associated with ‘/u00/app/oracle’, manually delete ‘/u00/app/oracle’ and its contents.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################

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

[oracle@ORA_SRVR deinstall]$

 

See Also: