Deinstall Oracle 19c Binaries along with Databases

December 22, 2021
()

Deinstall Oracle 19c Binaries along with Databases


In this article, we are going to demonstrate Deinstall Oracle 19c Binaries along with Databases on the operating system Linux. Deinstall is required if a server is going to decommission or binary is no more required specific to a version. Before moving to practical below are a few points to remember.

1. Make sure to invoke deinstall tool from the same ORACLE HOME which you want to deinstall.

2. It will remove all services running from the same ORACLE HOME if any along with removing all physical files, FRA, DIAG, SPFILE associated with running databases of HOME, ORACLE HOME directory, oraInventory (only If no other registered HOME/s to central inventory), checkpoints, etc.

3. Optionally you may take backup of databases and ORACLE HOME.

4. Deinstall command-line utility available in $ORACLE_HOME/deinstall/.

Let’s move to execute deinstall utility to remove Oracle 19c binary along with running two databases and LISTENER services associated with the home.

1. Set environment variables:

[oracle@DBsGurun5 ~]$ . oraenv
ORACLE_SID = [oracle] ? labcdb08
The Oracle base has been set to /u01/app/oracle


2. Launch tool deinstall:

[oracle@DBsGurun5 ~]$ cd $ORACLE_HOME/deinstall/
[oracle@DBsGurun5 deinstall]$ ls -lrt deinstall
-rwxr-x---. 1 oracle oinstall 11239 Oct 26 12:50 deinstall

[oracle@DBsGurun5 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...

Location of logs /tmp/deinstall2021-12-11_04-22-08PM/logs/

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


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


Checking for existence of the Oracle home location /u01/app/oracle/product/19.0.0/db_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2021-12-11_04-22-08PM/logs/netdc_check2021-12-11_04-25-13PM.log

Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:
Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2021-12-11_04-22-08PM/logs/databasedc_check2021-12-11_04-25-13PM.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 [labdb07,labcdb08]: labdb07,labcdb08

###### For Database 'labdb07' ######

Single Instance Database
The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/labdb07
Storage type used by the Database: FS
Database file location: /oradata/labdb07
Fast recovery area location: Does not exist
database spfile location: /u01/app/oracle/product/19.0.0/db_1/dbs/spfilelabdb07.ora

###### For Database 'labcdb08' ######

Single Instance Database
The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/labcdb08
Storage type used by the Database: FS
Database file location: /oradata/labcdb08
Fast recovery area location: Does not exist
database spfile location: /u01/app/oracle/product/19.0.0/db_1/dbs/spfilelabcdb08.ora

The details of database(s) labdb07,labcdb08 have been discovered automatically. Do you still want to modify the details of labdb07,labcdb08 database(s)? [n]: n

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u01/app/oracle/product/19.0.0/db_1
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER
The following databases were selected for de-configuration. The databases will be deleted and will not be useful upon de-configuration : labdb07,labcdb08
Database unique name : labdb07
Storage used : FS
Database unique name : labcdb08
Storage used : FS
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2021-12-11_04-22-08PM/logs/deinstall_deconfig2021-12-11_04-24-55-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-12-11_04-22-08PM/logs/deinstall_deconfig2021-12-11_04-24-55-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2021-12-11_04-22-08PM/logs/databasedc_clean2021-12-11_04-25-13PM.log
Database Clean Configuration START labdb07
This operation may take few minutes.
Database Clean Configuration END labdb07
Database Clean Configuration START labcdb08
This operation may take few minutes.
Database Clean Configuration END labcdb08

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2021-12-11_04-22-08PM/logs/netdc_clean2021-12-11_04-25-13PM.log

De-configuring Single Instance listener(s): LISTENER

De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Listener stopped 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 Local Net Service Names configuration file...
Local Net Service Names 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


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


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : labdb07,labcdb08
Following Single Instance listener(s) were de-configured successfully: LISTENER
#######################################################################


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

Using properties file /tmp/deinstall2021-12-11_04-22-08PM/response/deinstall_2021-12-11_04-24-55-PM.rsp
Location of logs /tmp/deinstall2021-12-11_04-22-08PM/logs/

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





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2021-12-11_04-22-08PM/logs/deinstall_deconfig2021-12-11_04-24-55-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-12-11_04-22-08PM/logs/deinstall_deconfig2021-12-11_04-24-55-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to DBsGurun5
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-12-11_04-22-08PM/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/oracle/product/19.0.0/db_1' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/product/19.0.0/db_1' on the local node : Done

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

Delete directory '/u01/app/oracle' 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/oracle/product/19.0.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/19.0.0/db_1' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.


Run 'rm -r st.l/etc/oraInoc' as root on node(s) 'DBsGurun5' at the end of the session.

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


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


Click here to know about Step by Step Drop Database using DBCA in Oracle

This document is just for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.


Hope so you like this article
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to understand more about our pursuit.


Related Articles


Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

<strong>Hello and welcome to DBsGuru,</strong>DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!<strong>Share Learn Grow!</strong>

Leave a Reply

Your email address will not be published. Required fields are marked *