Announcements

Oracle training based on real-time expertise as per industry standards. Upcoming batch details are here.

View batch schedule

Free Oracle mock interview. Register using the link.

Register

#DBAchallenge: submit your questions.

Ask questions
Swipe for more →
Browse by Topic
Latest Posts

    Thursday, July 29, 2021

    Jul – 2021 Patch Release Information - Jul 2021 CPU and PAD Documentation

    Critical Patch Update (CPU) Program Jul 2021 Patch Availability Document (PAD) (Doc ID 2773670.1) 

    Login to oracle support / MOS portal and search for required Patches or Jul 2021 Patch Availability Document (PAD) or Jul 2021 CPU

    https://support.oracle.com/

    Example:
    Critical Patch Update (CPU) Program Jul 2021 Patch Availability Document (PAD) (Doc ID 2773670.1)

    Previous CPU:

    Critical Patch Update (CPU) Program Jan 2021 Patch Availability Document (PAD) (Doc ID 2725756.1)
    Critical Patch Update (CPU) Program Apr 2021 Patch Availability Document (PAD) (Doc ID 2749094.1)


    Oracle will release patches on quarterly.

    Q1 - Jan
    Q2 - Apr
    Q3 - Jul
    Q4 - Oct

    Go to section 3 on the above document
         - Patch Availability for Oracle Products
             - This section contains the following:

    ·        Section 3.1 "Oracle Database"
    ·        Section 3.2 "Oracle Enterprise Manager"
    ·        Section 3.3 "Oracle Fusion Middleware"
    ·        Section 3.4 "Oracle Sun Middleware"
    ·        Section 3.5 "Tools"
     
    Go to section 3.1 on the above list
         - 3.1.4 Oracle Database
             - This section contains the following:

    19c Patch Details:

    Patch 32895426 – GI
    Patch 32904851 – DB
    Patch 32876380 – OJVM
    Patch 32900021 – DB+OJVM
     

    12.2 Patch Details:

    Patch 32916808 – DB
    Patch 32928749 – GI
    Patch 32876409 – OJVM
    Patch 32900144 – DB+OJVM
     

    12.1 Patch Details:

    Patch 32917362 – DB
    Patch 32917447 – GI
    Patch 32876425 – OJVM
    Patch 32900201 – DB+OJVM

     
    Regards,
    Mallik

    Sunday, July 18, 2021

    DROP ASM Instance using asmca or servctl - How to Delete ASM from Clusterware & GI Home Cleanup?

    DROP ASM Instance || servctl remove asm || How to Delete ASM from Clusterware? || GI Home Cleanup


    Below are high level steps for drop ASM/DB and cleanup GI Home and Oracle Home:

    Steps:

    1. Verify the running ASM and Database details:
    2. Drop database using dbca:
    3. Verify the database dropped and cleanup done:
    4. Deinstall Oracle Home :
    5. Verify the Oracle Home is cleaned up:
    6. Drop or delete ASM instance:
    7. Deinstall ASM Clusterware Home:
    8. Verify the GI Home is cleaned up:

    1. Verify the running ASM and Database details:

    [root@oraclelab3 ~]# ps -ef|grep smon
    root      3809  3735  0 08:41 pts/1    00:00:00 grep --color=auto smon
    oracle    7634     1  0 Jul16 ?        00:00:02 ora_smon_UATDB
    oracle   17624     1  0 Jul15 ?        00:00:03 asm_smon_+ASM
    [root@oraclelab3 ~]#

    [root@oraclelab3 ~]#su - oracle
    [oracle@oraclelab3]$ . oraenv
    ORACLE_SID = [oracle] ? +UATDB
    The Oracle base has been set to /u01/app/oracle
    [oracle@oraclelab3]$

    2. Drop database using dbca:

    [oracle@oraclelab3]$dbca
    >>> follow the GUI screen to proceed further and deinstall database

    check the reinstall log on the below cfgtoollogs directory:

    [root@oraclelab3 ~]# cd /u01/app/oracle/cfgtoollogs/
    [root@oraclelab3 cfgtoollogs]# ll
    total 12
    drwxr-x---. 2 oracle oinstall 4096 Jul 15 10:40 asmca
    drwxr-x---. 4 oracle oinstall   72 Jul 18 08:53 dbca
    drwxr-x---. 3 oracle oinstall   42 Jul 15 10:50 dbua
    drwxrwx---. 2 oracle oinstall    6 Jul 15 09:29 mgmtca
    drwxrwx---. 2 oracle oinstall    6 Jul 15 09:29 mgmtua
    drwxr-xr-x. 2 oracle oinstall 4096 Jul 15 09:30 netca
    drwxrwx---. 2 oracle oinstall    6 Jul 15 10:40 restca
    drwxr-x---. 5 oracle oinstall 4096 Jul 15 11:14 sqlpatch
    [root@oraclelab3 cfgtoollogs]# cd dbca
    [root@oraclelab3 dbca]# ll
    total 828
    drwxr-x---. 2 oracle oinstall   4096 Jul 18 08:53 DEVDB
    -rw-r-----. 1 oracle oinstall 841440 Jul 15 09:44 trace.log_2021-07-15_09-42-23-AM
    drwxr-x---. 2 oracle oinstall     27 Jul 18 08:53 UATDB
    [root@oraclelab3 dbca]# 

    3. Verify the database dropped and cleanup done:

    Verify /etc/oratab

    [root@oraclelab3 DEVDB]# su - oracle
    Last login: Sun Jul 18 03:45:29 IST 2021
    [oracle@oraclelab3 ~]$ cat /etc/oratab
    #Backup file is  /u01/app/19.0.0.0/grid/srvm/admin/oratab.bak.oraclelab3.oracle line added by Agent
    #
    # This file is used by ORACLE utilities.  It is created by root.sh
    # and updated by either Database Configuration Assistant while creating
    # a database or ASM Configuration Assistant while creating ASM instance.
    # A colon, ':', is used as the field terminator.  A new line terminates
    # the entry.  Lines beginning with a pound sign, '#', are comments.
    #
    # Entries are of the form:
    #   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    #
    # The first and second fields are the system identifier and home
    # directory of the database respectively.  The third field indicates
    # to the dbstart utility that the database should , "Y", or should not,
    # "N", be brought up at system boot time.
    #
    # Multiple entries with the same $ORACLE_SID are not allowed.
    #
    #
    +ASM:/u01/app/19.0.0.0/grid:N           # line added by Agent
    [oracle@oraclelab3 ~]$

    4. Deinstall Oracle Home :

    [oracle@oraclelab3 ~]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /u01/app/oraInventory/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.0/dbhome_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: /u01/app/oraInventory/logs/netdc_check2021-07-18_08-56-09AM.log

    Network Configuration check config END

    Database Check Configuration START

    Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2021-07-18_08-56-09AM.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

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

    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Home selected for deinstall is: /u01/app/oracle/product/19.0.0.0/dbhome_1
    Inventory Location where the Oracle home registered is: /u01/app/oraInventory
    Do you want to continue (y - yes, n - no)? [n]: y
    A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-18_08-56-08-AM.out'
    Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-18_08

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2021-07-18_08-56-09AM.log

    Network Configuration clean config START

    Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2021-07-18_08-56-09AM.log

    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 #######################
    #######################################################################

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

    Using properties file /tmp/deinstall2021-07-18_08-55-52AM/response/deinstall_2021-07-18_08-56-08-AM.rsp
    Location of logs /u01/app/oraInventory/logs/

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

    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-18_08-56-08-AM.out'
    Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-18_08

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oraclelab3
    Setting CRS_HOME to false
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-18_08-55-52AM/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.0/dbhome_1' from the central inventory on the local node : Done

    Delete directory '/u01/app/oracle/product/19.0.0.0/dbhome_1' on the local node : Done

    The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Hom

    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.0/dbhome_1' from the central inventory on the loca
    Successfully deleted directory '/u01/app/oracle/product/19.0.0.0/dbhome_1' on the local node.
    Oracle Universal Installer cleanup was successful.

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

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

    [oracle@oraclelab3 ~]$ 

    5. Verify the Oracle Home is cleaned up:

    Verify /u01/app/oraInventory/ContentsXML/inventory.xml

    [oracle@oraclelab3 ~]$ cd /u01/app/oracle/product/19.0.0.0/
    [oracle@oraclelab3 19.0.0.0]$ ll
    total 0
    [oracle@oraclelab3 19.0.0.0]$ cat /etc/oraInst.loc
    inventory_loc=/u01/app/oraInventory
    inst_group=oinstall
    [oracle@oraclelab3 19.0.0.0]$ cd /u01/app/oraInventory
    [oracle@oraclelab3 oraInventory]$ ll
    total 8
    drwxrwx---. 9 oracle oinstall 4096 Jul 18 08:56 backup
    drwxrwx---. 2 oracle oinstall   81 Jul 15 10:49 ContentsXML
    drwxrwx---. 6 oracle oinstall 4096 Jul 18 08:56 logs
    drwxrwx---. 2 oracle oinstall   22 Jul 15 09:36 oui
    [oracle@oraclelab3 oraInventory]$ cd ContentsXML
    [oracle@oraclelab3 ContentsXML]$ ll
    total 16
    -rw-rw----. 1 oracle oinstall 300 Jul 18 08:56 comps.xml
    -rw-rw----. 1 oracle oinstall 663 Jul 18 08:56 inventory.xml
    -rw-rw----. 1 oracle oinstall 292 Jul 18 08:56 libs.xml
    -rw-rw----. 1 oracle oinstall 174 Jul 15 10:49 oui-patch.xml
    [oracle@oraclelab3 ContentsXML]$

    [oracle@oraclelab3 ContentsXML]$ cat inventory.xml
    <?xml version="1.0" standalone="yes" ?>
    <!-- Copyright (c) 1999, 2021, Oracle and/or its affiliates.
    All rights reserved. -->
    <!-- Do not modify the contents of this file by hand. -->
    <INVENTORY>
    <VERSION_INFO>
       <SAVED_WITH>12.2.0.7.0</SAVED_WITH>
       <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
    </VERSION_INFO>
    <HOME_LIST>
    <HOME NAME="OraGI19Home1" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="3" CRS="true"/>
    <HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0.1/dbhome_1" TYPE="O" IDX="2" REMOVED="T"/>
    <HOME NAME="OraGI12Home1" LOC="/u01/app/12.2.0.1/grid" TYPE="O" IDX="1" REMOVED="T"/>
    </HOME_LIST>
    <COMPOSITEHOME_LIST>
    </COMPOSITEHOME_LIST>
    </INVENTORY>
    [oracle@oraclelab3 ContentsXML]$

    6. Drop or delete ASM instance:

    [oracle@oraclelab3 12.2.0.1]$ . oraenv
    ORACLE_SID = [oracle] ? +ASM
    The Oracle base has been set to /u01/app/oracle

    [oracle@oraclelab3 12.2.0.1]$ srvctl remove asm -force

    [oracle@oraclelab3 12.2.0.1]$ ps -ef|grep smon
    oracle   12398  8016  0 09:00 pts/1    00:00:00 grep --color=auto smon
    oracle   17624     1  0 Jul15 ?        00:00:03 asm_smon_+ASM

    [oracle@oraclelab3 12.2.0.1]$ srvctl config ASM
    PRCR-1001 : Resource ora.asm does not exist >>>>>>>>>>>>>>>>>>>>>>>>> ASM got removed from the clusterware

    [oracle@oraclelab3 12.2.0.1]$ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       oraclelab3               STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       oraclelab3               STABLE
    ora.RECO.dg
                   OFFLINE OFFLINE      oraclelab3               STABLE
    ora.ons
                   OFFLINE OFFLINE      oraclelab3               STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.cssd
          1        ONLINE  ONLINE       oraclelab3               STABLE
    ora.diskmon
          1        OFFLINE OFFLINE                               STABLE
    ora.evmd
          1        ONLINE  ONLINE       oraclelab3               STABLE
    --------------------------------------------------------------------------------
    [oracle@oraclelab3 12.2.0.1]$

    Connect to ASM and verify the password and spfile:

    [oracle@oraclelab3 12.2.0.1]$ . oraenv
    ORACLE_SID = [+ASM] ?
    ORACLE_HOME = [/home/oracle] ? /u01/app/19.0.0.0/grid
    The Oracle base remains unchanged with value /u01/app/oracle

    [oracle@oraclelab3 12.2.0.1]$ sqlplus / as sysdba

    SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jul 18 09:01:42 2021
    Version 19.3.0.0.0

    Copyright (c) 1982, 2019, Oracle.  All rights reserved.

    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    SQL> 
    SQL> show parameter spfile;

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    spfile                               string      +DATA/ASM/ASMPARAMETERFILE/registry.253.1077960677
    SQL> 

    Connect to asmcmd and verify the password and spfile:

    [oracle@oraclelab3 12.2.0.1]$ asmcmd -p
    ASMCMD [+] > cd +DATA/ASM
    ASMCMD [+DATA/ASM] > ls
    ASMPARAMETERFILE/
    PASSWORD/
    ASMCMD [+DATA/ASM] > cd PASSWORD/
    ASMCMD [+DATA/ASM/PASSWORD] > ls
    pwdasm.256.1077960677
    ASMCMD [+DATA/ASM/PASSWORD] > ls -l
    Type      Redund  Striped  Time             Sys  Name
    PASSWORD  UNPROT  COARSE   JUL 15 09:00:00  Y    pwdasm.256.1077960677
    ASMCMD [+DATA/ASM/PASSWORD] > pwd
    +DATA/ASM/PASSWORD
    ASMCMD [+DATA/ASM/PASSWORD] > exit
    [oracle@oraclelab3 12.2.0.1]$

    [oracle@oraclelab3 12.2.0.1]$ srvctl config asm
    PRCR-1001 : Resource ora.asm does not exist >>>>>>>>>>>>>>>>>>> Since we removed it from cluster so srvctl command will not work 
    [oracle@oraclelab3 12.2.0.1]$

    Try to delete ASM instance now which will fail with syntax error:

    [oracle@oraclelab3 12.2.0.1]$ asmca -silent -deleteASM –sysAsmPassword +DATA/ASM/PASSWORD/pwdasm.256.1077960677 -for

    The command line is not formed properly. Type "asmca -h" to get the command line syntax.

    [oracle@oraclelab3 12.2.0.1]$

    We will reconfigure ASM Instance and add ASM Instance back to Cluster:

    [oracle@oraclelab3 12.2.0.1]$ srvctl add asm -pwfile +DATA/ASM/PASSWORD/pwdasm.256.1077960677
    [oracle@oraclelab3 12.2.0.1]$ srvctl config ASM
    ASM home: <CRS home>
    Password file: +DATA/ASM/PASSWORD/pwdasm.256.1077960677
    Backup of Password file:
    ASM listener: LISTENER
    Spfile:
    ASM diskgroup discovery string: ++no-value-at-resource-creation--never-updated-through-ASM++
    [oracle@oraclelab3 12.2.0.1]$

    Try to delete ASM Instance now using below command:

    [oracle@oraclelab3 12.2.0.1]$ asmca -silent -deleteASM
    Are you sure you want to delete the ASM instance (Y/N)? y

    ASM instance deleted successfully. Check /u01/app/oracle/cfgtoollogs/asmca/asmca-210718AM091240.log for details.

    [oracle@oraclelab3 12.2.0.1]$

    Verify the logs:

    ============
    [oracle@oraclelab3 12.2.0.1]$ more /u01/app/oracle/cfgtoollogs/asmca/asmca-210718AM091240.log
    [main] [ 2021-07-18 09:12:40.624 IST ] [InventoryUtil.getOUIInvSession:349]  setting OUI READ level to ACCESSLEVEL_R
    [main] [ 2021-07-18 09:12:40.624 IST ] [InventoryUtil.isCRSHome:386]  Homeinfo /u01/app/19.0.0.0/grid,3
    [main] [ 2021-07-18 09:12:40.896 IST ] [HASContext.<init>:128]  moduleInit = 7
    [main] [ 2021-07-18 09:12:40.896 IST ] [Library.load:205]  library.load
    ..............................
    ..............................
    ..............................
    [main] [ 2021-07-18 09:12:41.776 IST ] [RuntimeExec.runCommand:323]  RunTimeExec: error>
    [main] [ 2021-07-18 09:12:41.777 IST ] [RuntimeExec.runCommand:349]  Returning from RunTimeExec.runCommand
    [main] [ 2021-07-18 09:12:41.777 IST ] [CmdToolUtil.doexecuteLocally:1536]  retval =  0
    [main] [ 2021-07-18 09:12:41.777 IST ] [CmdToolUtil.doexecuteLocally:1537]  exitval =  0
    [main] [ 2021-07-18 09:12:41.777 IST ] [CmdToolUtil.doexecuteLocally:1538]  rtErrLength =  0
    [main] [ 2021-07-18 09:12:41.777 IST ] [CmdToolUtil.doexecuteLocally:1526]  OS Name is...Linux
    [main] [ 2021-07-18 09:12:41.777 IST ] [CmdToolUtil.enforceEnglishVars:1721]  Set environment for English language
    [main] [ 2021-07-18 09:12:41.777 IST ] [CmdToolUtil.enforceEnglishVars:1722]  OS Name is...Linux
    [oracle@oraclelab3 12.2.0.1]$ 

    Verify that ASM Instance has dropped:

    [oracle@oraclelab3 12.2.0.1]$ ps -ef|grep smon
    oracle   16201  8016  0 09:13 pts/1    00:00:00 grep --color=auto smon
    [oracle@oraclelab3 12.2.0.1]$

    7. Deinstall ASM Clusterware Home:

    Issue 1:
    ========
    Deinstall ASM Clusterware Home failed due to ASM Instance started back using local pfile and not allowed us to create ASM spfile:

    Error message cab eb found on the log file:

    [oracle@oraclelab3 12.2.0.1]$ env |grep ORA
    ORACLE_SID=+ASM
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/19.0.0.0/grid
    [oracle@oraclelab3 12.2.0.1]$

    [oracle@oraclelab3 12.2.0.1]$ /u01/app/19.0.0.0/grid/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /tmp/deinstall2021-07-18_09-13-37AM/logs/

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

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

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

    ## [END] Install check configuration ##

    Traces log file: /tmp/deinstall2021-07-18_09-13-37AM/logs//crsdc_2021-07-18_09-13-50-AM.log

    Network Configuration check config START

    Network de-configuration trace file location: /tmp/deinstall2021-07-18_09-13-37AM/logs/netdc_check2021-07-18_09-13-5

    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/deinstall2021-07-18_09-13-37AM/logs/asmcadc_check2021-07-18_09-13-50A

    ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
    Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/19.0.0.0/grid.
    ASM Diagnostic Destination : /u01/app/oracle
    ASM Diskgroups : +DATA,+RECO
    ASM diskstring : <Default>
    Diskgroups will be dropped
    De-configuring ASM will drop all the diskgroups and their contents at cleanup time. This will affect all of the datathat use this ASM instance(s).
     If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify byDo you  want to modify above information (y|n) [n]:
    Database Check Configuration START

    Database de-configuration trace file location: /tmp/deinstall2021-07-18_09-13-37AM/logs/databasedc_check2021-07-18_0

    Database Check Configuration END

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

    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Grid Infrastructure Home is: /u01/app/19.0.0.0/grid
    Oracle Home selected for deinstall is: /u01/app/19.0.0.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/deinstall2021-07-18_09-13-37AM/logs/deinstall_deconfig2021-07-18_09-
    Any error messages from this session will be written to: '/tmp/deinstall2021-07-18_09-13-37AM/logs/deinstall_deconfi13-49-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /tmp/deinstall2021-07-18_09-13-37AM/logs/databasedc_clean2021-07-18_0
    ASM de-configuration trace file location: /tmp/deinstall2021-07-18_09-13-37AM/logs/asmcadc_clean2021-07-18_09-13-50A
    ASM Clean Configuration START
    ERROR: Exception while creating local spfile for ASMORA-29786: Oracle Restart attribute GET failed with error [Attrits[200] lsts[0]]

    Exited from program.

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

    [oracle@oraclelab3 12.2.0.1]$

    Logfile:

    [oracle@oraclelab3 ~]$ more /tmp/deinstall2021-07-18_09-13-37AM/logs/asmcadc_clean2021-07-18_09-13-50AM.log
    [main] [ 2021-07-18 09:15:44.686 IST ] [USMCleanConfig.cleanConfigInternal:293]  DC home value /tmp/deinstall2021-07
    [main] [ 2021-07-18 09:15:44.686 IST ] [DeconfigUtil.printAllEnvs:713]  ORACLE_HOME=/u01/app/19.0.0.0/grid
    [main] [ 2021-07-18 09:15:44.686 IST ] [DeconfigUtil.printAllEnvs:714]  ORACLE_BASE=/u01/app/oracle
    [main] [ 2021-07-18 09:15:44.686 IST ] [DeconfigUtil.printAllEnvs:715]  ORACLE_SID=+ASM
    [main] [ 2021-07-18 09:15:44.686 IST ] [DeconfigUtil.printAllEnvs:716]  ORA_CRS_HOME=null
    [main] [ 2021-07-18 09:15:44.686 IST ] [DeconfigUtil.printAllEnvs:717]  PATH=/usr/local/bin:/bin:/usr/bin:/usr/local
    :/home/oracle/.local/bin:/home/oracle/bin:/u01/app/19.0.0.0/grid/bin
    ........................
    ........................
    ........................
    [main] [ 2021-07-18 09:15:52.842 IST ] [OracleHome.getVersion:1182]  /u01/app/19.0.0.0/grid/bin/sqlplus Banner:

    SQL*Plus: Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0

    [main] [ 2021-07-18 09:15:52.843 IST ] [OracleHome.getVersion:1200]  Current version from sqlplus: 19.0.0.0.0
    [main] [ 2021-07-18 09:15:52.843 IST ] [OracleHome.getVersion:1066]  OracleHome.getVersion called.  Current Version:
    [main] [ 2021-07-18 09:15:52.843 IST ] [OracleHome.getVersion:1134]  Current Version From Inventory: 19.0.0.0.0
    [main] [ 2021-07-18 09:15:52.843 IST ] [OracleHome.getVersion:1066]  OracleHome.getVersion called.  Current Version:
    [main] [ 2021-07-18 09:15:52.843 IST ] [OracleHome.getVersion:1134]  Current Version From Inventory: 19.0.0.0.0
    [main] [ 2021-07-18 09:15:52.843 IST ] [SQLPlusEngine.getCmmdParams:226]  m_home 19.0.0.0.0
    [main] [ 2021-07-18 09:15:52.843 IST ] [SQLPlusEngine.getCmmdParams:227]  version > 112 true
    [main] [ 2021-07-18 09:15:52.843 IST ] [SQLEngine.getEnvParams:619]  Default NLS_LANG: AMERICAN_AMERICA.AL32UTF8
    [main] [ 2021-07-18 09:15:52.843 IST ] [SQLEngine.getEnvParams:629]  NLS_LANG: AMERICAN_AMERICA.AL32UTF8
    [main] [ 2021-07-18 09:15:52.843 IST ] [SQLEngine.initialize:376]  Execing SQLPLUS/SVRMGR process...
    [main] [ 2021-07-18 09:15:52.846 IST ] [SQLEngine.initialize:413]  m_bReaderStarted: false
    [main] [ 2021-07-18 09:15:52.846 IST ] [SQLEngine.initialize:417]  Starting Reader Thread...
    [main] [ 2021-07-18 09:15:53.873 IST ] [ASMUtils.discoverASMClients:1017]  SQL select unique(db_name) from v$asm_cli
    me != '+ASM'
    [main] [ 2021-07-18 09:15:53.875 IST ] [SQLEngine.done:2362]  Done called
    [main] [ 2021-07-18 09:15:53.876 IST ] [ASMUtils.discoverASMClients:1022]  SQFatalErrorException while retrieving AS
    -01034: ORACLE not available

    [main] [ 2021-07-18 09:15:53.876 IST ] [SQLEngine.done:2362]  Done called
    [main] [ 2021-07-18 09:15:53.876 IST ] [USMCleanConfig.createSPFileLocal:1444]  SPFile is not yet localized
    [main] [ 2021-07-18 09:15:53.876 IST ] [USMCleanConfig.createSPFileLocal:1446]  create temp spfile sql= create spfil
    0.0.0/grid/dbs/spfile+ASM.ora' from memory
    [main] [ 2021-07-18 09:15:53.965 IST ] [SQLEngine.done:2362]  Done called
    [main] [ 2021-07-18 09:15:53.967 IST ] [USMCleanConfig.createSPFileLocal:1459]  ORA-29786: Oracle Restart attribute
     error [Attribute 'SPFILE' sts[200] lsts[0]]

    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at oracle.install.db.deinstall.wrapper.Deinstall.callCleanImpl(Deinstall.java:1867)
            at oracle.install.db.deinstall.wrapper.Deinstall.main(Deinstall.java:907)
    Caused by: oracle.ops.util.FatalException: Exception while creating local spfile for ASMORA-29786: Oracle Restart at
    led with error [Attribute 'SPFILE' sts[200] lsts[0]]

            at oracle.sysman.assistants.util.deconfig.USMCleanConfig.createSPFileLocal(USMCleanConfig.java:1460)
            at oracle.sysman.assistants.util.deconfig.USMCleanConfig.cleanSIHAASM(USMCleanConfig.java:541)
            at oracle.sysman.assistants.util.deconfig.USMCleanConfig.cleanCreateASM(USMCleanConfig.java:466)
            at oracle.sysman.assistants.util.deconfig.USMCleanConfig.cleanConfigInternal(USMCleanConfig.java:357)
            at oracle.sysman.assistants.util.deconfig.USMCleanConfig.cleanConfig(USMCleanConfig.java:248)
            ... 6 more
    [oracle@oraclelab3 ~]$ 

    Verify that ASM Instance started and running from local pfile:
    Kill that ASM Instance manually

    [oracle@oraclelab3 12.2.0.1]$ ps -ef|grep smon
    oracle   19571     1  0 09:15 ?        00:00:00 asm_smon_+ASM
    oracle   19939  8016  0 09:17 pts/1    00:00:00 grep --color=auto smon

    [oracle@oraclelab3 12.2.0.1]$ . oraenv
    ORACLE_SID = [+ASM] ?
    ORACLE_HOME = [/home/oracle] ? /u01/app/19.0.0.0/grid
    The Oracle base remains unchanged with value /u01/app/oracle
    [oracle@oraclelab3 12.2.0.1]$ sqlplus / as sysdba

    SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jul 18 09:18:12 2021
    Version 19.3.0.0.0

    Copyright (c) 1982, 2019, Oracle.  All rights reserved.

    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0

    SQL> show parameter spfile;

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    spfile                               string
    SQL> exit
    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0

    [oracle@oraclelab3 12.2.0.1]$ ps -ef|grep smon
    oracle   19571     1  0 09:15 ?        00:00:00 asm_smon_+ASM
    oracle   20046  8016  0 09:18 pts/1    00:00:00 grep --color=auto smon
    [oracle@oraclelab3 12.2.0.1]$

    [oracle@oraclelab3 12.2.0.1]$ kill -9 19571

    Start Deinstall Clusterware home now:

    [oracle@oraclelab3 12.2.0.1]$ /u01/app/19.0.0.0/grid/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /tmp/deinstall2021-07-18_09-18-40AM/logs/

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

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

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

    ## [END] Install check configuration ##

    Traces log file: /tmp/deinstall2021-07-18_09-18-40AM/logs//crsdc_2021-07-18_09-18-46-AM.log

    Network Configuration check config START

    Network de-configuration trace file location: /tmp/deinstall2021-07-18_09-18-40AM/logs/netdc_check2021-07-18_09-18-4

    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/deinstall2021-07-18_09-18-40AM/logs/asmcadc_check2021-07-18_09-18-47A

    ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
    Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/19.0.0.0/grid.
    ASM Diagnostic Destination : /u01/app/oracle
    ASM Diskgroups : +DATA,+RECO
    ASM diskstring : <Default>
    Diskgroups will be dropped
    De-configuring ASM will drop all the diskgroups and their contents at cleanup time. This will affect all of the datathat use this ASM instance(s).
     If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify byDo you  want to modify above information (y|n) [n]:
    Database Check Configuration START

    Database de-configuration trace file location: /tmp/deinstall2021-07-18_09-18-40AM/logs/databasedc_check2021-07-18_0

    Database Check Configuration END

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

    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Grid Infrastructure Home is: /u01/app/19.0.0.0/grid
    Oracle Home selected for deinstall is: /u01/app/19.0.0.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/deinstall2021-07-18_09-18-40AM/logs/deinstall_deconfig2021-07-18_09-
    Any error messages from this session will be written to: '/tmp/deinstall2021-07-18_09-18-40AM/logs/deinstall_deconfi18-45-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /tmp/deinstall2021-07-18_09-18-40AM/logs/databasedc_clean2021-07-18_0
    ASM de-configuration trace file location: /tmp/deinstall2021-07-18_09-18-40AM/logs/asmcadc_clean2021-07-18_09-18-47A
    ASM Clean Configuration START
    ASM Clean Configuration END

    Network Configuration clean config START

    Network de-configuration trace file location: /tmp/deinstall2021-07-18_09-18-40AM/logs/netdc_clean2021-07-18_09-18-4

    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 "oraclelab3".

    /u01/app/19.0.0.0/grid/crs/install/roothas.sh -force  -deconfig -paramfile "/tmp/deinstall2021-07-18_09-18-40AM/respOraGI19Home1.rsp"

    Press Enter after you finish running the above commands

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

    *********************************************************************************************
    Take A new session and run the above command and come back here and hit enter
    *********************************************************************************************
    [root@oraclelab3 ~]# /u01/app/19.0.0.0/grid/crs/install/roothas.sh -force  -deconfig -paramfile "/tmp/deinstall2021-M/response/deinstall_OraGI19Home1.rsp"
    Using configuration parameter file: /tmp/deinstall2021-07-18_09-18-40AM/response/deinstall_OraGI19Home1.rsp
    The log of current session can be found at:
      /tmp/deinstall2021-07-18_09-18-40AM/logs/hadeconfig.log
    2021/07/18 09:20:12 CLSRSC-337: Successfully deconfigured Oracle Restart stack
    [root@oraclelab3 ~]#
    *********************************************************************************************
    *********************************************************************************************
    ######################### 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 "oraclelab3"
    Oracle Restart is stopped and de-configured successfully.
    #######################################################################

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

    Using properties file /tmp/deinstall2021-07-18_09-18-40AM/response/deinstall_2021-07-18_09-18-45-AM.rsp
    Location of logs /tmp/deinstall2021-07-18_09-18-40AM/logs/

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

    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/tmp/deinstall2021-07-18_09-18-40AM/logs/deinstall_deconfig2021-07-18_09-
    Any error messages from this session will be written to: '/tmp/deinstall2021-07-18_09-18-40AM/logs/deinstall_deconfi18-45-AM.err'

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oraclelab3
    Setting CRS_HOME to true
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-18_09-18-40AM/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/19.0.0.0/grid' from the central inventory on the local node : Done

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

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

    Failed to delete the directory '/u01/app/oracle/tfa/oraclelab3/output/dbzip'. Either user has no permission to deletse.
    Failed to delete the directory '/u01/app/oracle/tfa/oraclelab3/output/tracefiles'. Either user has no permission to  in use.
    Failed to delete the directory '/u01/app/oracle/tfa/oraclelab3/diagnostics_to_collect'. Either user has no permissioit is in use.
    The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is not empty. User needleanup this directory.

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

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

    Run 'rm -r /opt/ORCLfmap' as root on node(s) 'oraclelab3' at the end of the session.
    Run 'rm -r /etc/oratab' as root on node(s) 'oraclelab3' at the end of the session.
    Review the permissions and contents of '/u01/app/oracle' on nodes(s) 'oraclelab3'.
    If there are no Oracle home(s) associated with '/u01/app/oracle', manually delete '/u01/app/oracle' and its contents
    Oracle deinstall tool successfully cleaned up temporary directories.
    #######################################################################

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

    [oracle@oraclelab3 12.2.0.1]$

    8. Verify the GI Home is cleaned up:

    Verify the ASM home cleanup done and manually remove the forlders woned by root user:

    [root@oraclelab3 ~]# rm -r /etc/oraInst.loc
    rm: remove regular file ‘/etc/oraInst.loc’? y
    [root@oraclelab3 ~]# rm -r /opt/ORCLfmap
    rm: descend into directory ‘/opt/ORCLfmap’? y
    rm: descend into directory ‘/opt/ORCLfmap/prot1_64’? y
    rm: descend into directory ‘/opt/ORCLfmap/prot1_64/bin’? y
    rm: remove regular file ‘/opt/ORCLfmap/prot1_64/bin/fmputl’? y
    rm: remove regular file ‘/opt/ORCLfmap/prot1_64/bin/fmputlhp’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64/bin’? y
    rm: descend into directory ‘/opt/ORCLfmap/prot1_64/etc’? y
    rm: remove regular file ‘/opt/ORCLfmap/prot1_64/etc/filemap.ora’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64/etc’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64/log’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64’? y
    rm: remove directory ‘/opt/ORCLfmap’? y
    [root@oraclelab3 ~]# rm -r /etc/oratab
    rm: remove regular file ‘/etc/oratab’? y
    [root@oraclelab3 ~]# cd /u01/app/oracle
    [root@oraclelab3 oracle]# ll
    total 4
    drwxr-x---. 3 oracle oinstall   21 Jul 18 09:19 admin
    drwxr-xr-x. 3 oracle oinstall   18 Jul 15 09:32 log
    drwxr-x---. 2 oracle oinstall 4096 Jul 15 02:42 oradata
    drwxr-xr-x. 5 root   root       79 Jul 15 09:39 tfa
    [root@oraclelab3 oracle]# rm -rf tfa/
    [root@oraclelab3 oracle]# rm -rf *
    [root@oraclelab3 oracle]# cd ..
    [root@oraclelab3 app]# ll
    total 0
    drwxr-xr-x. 2 oracle oinstall 6 Jul 16 08:20 12.2.0.1
    drwxr-xr-x. 2 oracle oinstall 6 Jul 18 09:20 19.0.0.0
    drwxr-xr-x. 2 oracle oinstall 6 Jul 18 09:22 oracle
    [root@oraclelab3 app]# 
    [root@oraclelab3 12.2.0.1]# cd ../19.0.0.0/
    [root@oraclelab3 19.0.0.0]# ll
    total 0
    [root@oraclelab3 19.0.0.0]#

    Regards,
    Mallik

    Friday, July 16, 2021

    Cleanup Old GI and DB homes || Deinstall Old GI & DB After GI and DB upgradation

    Deinstall Old GI & DB After GI and DB upgradation


    Once we do GI upgrade we will be having old and new GI home on server, Also entry will be available on central inventory.

    Once we do DB upgrade we will be having old and new DB home on server, Also entry will be available on central inventory.

    We need to cleanup these Old GI and DB homes from server as well from central inventory

    Steps:

    1. Verify the current running ASM and DBs:
    2. Verify central inventory which contains old and new GI and DB home information:
    3. Old DB Home deinstallation:
    4. Old GI Home deinstallation:

    1. Verify the current running ASM and DBs:

    [root@oraclelab3 ~]# ps -ef|grep smon
    oracle   11757     1  0 Jul15 ?        00:00:01 ora_smon_DEVDB
    oracle   17624     1  0 Jul15 ?        00:00:01 asm_smon_+ASM
    root     18001 16233  0 08:07 pts/2    00:00:00 grep --color=auto smon
    [root@oraclelab3 ~]# 

    [root@oraclelab3 ~]# cat /etc/oratab
    #Backup file is  /u01/app/oracle/crsdata/oraclelab3/output/oratab.bak.oraclelab3.oracle line added by Agent
    #
    # This file is used by ORACLE utilities.  It is created by root.sh
    # and updated by either Database Configuration Assistant while creating
    # a database or ASM Configuration Assistant while creating ASM instance.
    # A colon, ':', is used as the field terminator.  A new line terminates
    # the entry.  Lines beginning with a pound sign, '#', are comments.
    #
    # Entries are of the form:
    #   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    #
    # The first and second fields are the system identifier and home
    # directory of the database respectively.  The third field indicates
    # to the dbstart utility that the database should , "Y", or should not,
    # "N", be brought up at system boot time.
    #
    # Multiple entries with the same $ORACLE_SID are not allowed.
    #
    #
    +ASM:/u01/app/19.0.0.0/grid:N           # line added by Agent
    DEVDB:/u01/app/oracle/product/19.0.0.0/dbhome_1:N               # line added by Agent
    [root@oraclelab3 ~]#

    2. Verify central inventory which contains old and new GI and DB home information:

    [root@oraclelab3 ~]# cat /etc/oraInst.loc
    inventory_loc=/u01/app/oraInventory
    inst_group=oinstall
    [root@oraclelab3 ~]#

    [root@oraclelab3 ~]# cd /u01/app/oraInventory
    [root@oraclelab3 oraInventory]# ll
    total 8
    drwxrwx---. 6 oracle oinstall 4096 Jul 15 10:49 backup
    drwxrwx---. 2 oracle oinstall   81 Jul 15 10:49 ContentsXML
    drwxrwx---. 6 oracle oinstall 4096 Jul 15 10:48 logs
    drwxrwx---. 2 oracle oinstall   22 Jul 15 09:36 oui
    [root@oraclelab3 oraInventory]# cd ContentsXML
    [root@oraclelab3 ContentsXML]# ls -ltrh
    total 16K
    -rw-rw----. 1 oracle oinstall 732 Jul 15 10:49 inventory.xml
    -rw-rw----. 1 oracle oinstall 174 Jul 15 10:49 oui-patch.xml
    -rw-rw----. 1 oracle oinstall 292 Jul 15 10:49 libs.xml
    -rw-rw----. 1 oracle oinstall 300 Jul 15 10:49 comps.xml
    [root@oraclelab3 ContentsXML]# pwd
    /u01/app/oraInventory/ContentsXML
    [root@oraclelab3 ContentsXML]# cat inventory.xml
    <?xml version="1.0" standalone="yes" ?>
    <!-- Copyright (c) 1999, 2021, Oracle and/or its affiliates.
    All rights reserved. -->
    <!-- Do not modify the contents of this file by hand. -->
    <INVENTORY>
    <VERSION_INFO>
       <SAVED_WITH>12.2.0.7.0</SAVED_WITH>
       <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
    </VERSION_INFO>
    <HOME_LIST>
    <HOME NAME="OraGI12Home1" LOC="/u01/app/12.2.0.1/grid" TYPE="O" IDX="1"/>
    <HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0.1/dbhome_1" TYPE="O" IDX="2"/>
    <HOME NAME="OraGI19Home1" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="3" CRS="true"/>
    <HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19.0.0.0/dbhome_1" TYPE="O" IDX="4"/>
    </HOME_LIST>
    <COMPOSITEHOME_LIST>
    </COMPOSITEHOME_LIST>
    </INVENTORY>
    [root@oraclelab3 ContentsXML]#

    3. Old DB Home deinstallation:

    [root@oraclelab3 ContentsXML]# su - oracle
    Last login: Fri Jul 16 03:45:31 IST 2021
    [oracle@oraclelab3 ~]$

    [oracle@oraclelab3 ~]$ cd /u01/app/oracle/product/12.2.0.1/dbhome_1/deinstall/
    [oracle@oraclelab3 deinstall]$ ll
    total 168
    -rw-r-----. 1 oracle oinstall 53984 Jan 26  2017 bootstrap_files.lst
    -rwxr-x---. 1 oracle oinstall 14198 Oct 12  2016 bootstrap.pl
    -rwxr-x---. 1 oracle oinstall 11332 Jul 15 09:38 deinstall
    -rwxr-x---. 1 oracle oinstall 32731 Jul 13  2016 deinstall.pl
    -rw-r-----. 1 oracle oinstall  8800 Sep 25  2015 deinstall.xml
    drwxr-xr-x. 2 oracle oinstall   102 Jul 15 09:36 jlib
    -rw-r-----. 1 oracle oinstall   401 Feb 10  2012 readme.txt
    drwxr-xr-x. 2 oracle oinstall    32 Jul 15 09:36 response
    -rwxr-x---. 1 oracle oinstall 33333 Jan  7  2015 sshUserSetup.sh
    drwxr-xr-x. 2 oracle oinstall    33 Jul 15 09:36 utl
    [oracle@oraclelab3 deinstall]$ cd
    [oracle@oraclelab3 ~]$ /u01/app/oracle/product/12.2.0.1/dbhome_1/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /u01/app/oraInventory/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/12.2.0.1/dbhome_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: /u01/app/oraInventory/logs/netdc_check2021-07-16_08-14-10-AM.log

    Network Configuration check config END

    Database Check Configuration START

    Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2021-07-16_08-14-11-AM.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 : /u01/app/oraInventory/logs//ocm_check5642.log
    Oracle Configuration Manager check END

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

    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Home selected for deinstall is: /u01/app/oracle/product/12.2.0.1/dbhome_1
    Inventory Location where the Oracle home registered is: /u01/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: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-14-09-AM.out'
    Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-14-09-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2021-07-16_08-15-09-AM.log

    Network Configuration clean config START

    Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2021-07-16_08-15-09-AM.log

    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

    Oracle Configuration Manager clean START
    OCM clean log file location : /u01/app/oraInventory/logs//ocm_clean5642.log
    Oracle Configuration Manager clean END

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

    ####################### DECONFIG CLEAN OPERATION SUMMARY #######################
    Cleaning the config for CCR
    As CCR is not configured, so skipping the cleaning of CCR configuration
    CCR clean is finished
    #######################################################################

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

    Using properties file /tmp/deinstall2021-07-16_08-13-53AM/response/deinstall_2021-07-16_08-14-09-AM.rsp
    Location of logs /u01/app/oraInventory/logs/

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

    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-14-09-AM.out'
    Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-14-09-AM.err'

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oraclelab3
    Setting CRS_HOME to false
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-16_08-13-53AM/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/12.2.0.1/dbhome_1' from the central inventory on the local node : Done

    Delete directory '/u01/app/oracle/product/12.2.0.1/dbhome_1' on the local node : Done

    The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/12.2.0.1/grid'.

    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 #######################
    Run '/u01/app/oracle/tfa/oraclelab3/tfa_home/bin/tfactl uninstall' as root to uninstall tfa.

    Successfully detached Oracle home '/u01/app/oracle/product/12.2.0.1/dbhome_1' from the central inventory on the local node.
    Successfully deleted directory '/u01/app/oracle/product/12.2.0.1/dbhome_1' on the local node.
    Oracle Universal Installer cleanup was successful.

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

    ############# ORACLE DEINSTALL TOOL END #############
    [oracle@oraclelab3 ~]$

    [oracle@oraclelab3 ~]$ cd /u01/app/oracle/product/12.2.0.1/
    [oracle@oraclelab3 12.2.0.1]$ ll
    total 0
    [oracle@oraclelab3 12.2.0.1]$ cd /u01/app/oraInventory/ContentsXML
    [oracle@oraclelab3 ContentsXML]$ ll
    total 16
    -rw-rw----. 1 oracle oinstall 329 Jul 16 08:15 comps.xml
    -rw-rw----. 1 oracle oinstall 744 Jul 16 08:15 inventory.xml
    -rw-rw----. 1 oracle oinstall 292 Jul 16 08:15 libs.xml
    -rw-rw----. 1 oracle oinstall 174 Jul 15 10:49 oui-patch.xml
    [oracle@oraclelab3 ContentsXML]$ cat inventory.xml
    <?xml version="1.0" standalone="yes" ?>
    <!-- Copyright (c) 1999, 2021, Oracle and/or its affiliates.
    All rights reserved. -->
    <!-- Do not modify the contents of this file by hand. -->
    <INVENTORY>
    <VERSION_INFO>
       <SAVED_WITH>12.2.0.1.4</SAVED_WITH>
       <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
    </VERSION_INFO>
    <HOME_LIST>
    <HOME NAME="OraGI12Home1" LOC="/u01/app/12.2.0.1/grid" TYPE="O" IDX="1"/>
    <HOME NAME="OraGI19Home1" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="3" CRS="true"/>
    <HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19.0.0.0/dbhome_1" TYPE="O" IDX="4"/>
    <HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0.1/dbhome_1" TYPE="O" IDX="2" REMOVED="T"/>
    </HOME_LIST>
    <COMPOSITEHOME_LIST>
    </COMPOSITEHOME_LIST>
    </INVENTORY>
    [oracle@oraclelab3 ContentsXML]$ 

    4. Old GI Home deinstallation:

    [oracle@oraclelab3 ContentsXML]$ cd /u01/app/12.2.0.1/grid/deinstall/
    [oracle@oraclelab3 deinstall]$ ll
    total 180
    -rw-r-----. 1 oracle oinstall 53984 Jan 26  2017 bootstrap_files.lst
    -rwxr-x---. 1 oracle oinstall 14198 Oct 12  2016 bootstrap.pl
    -rwxr-x---. 1 oracle oinstall 11313 Jul 15 09:28 deinstall
    -rw-r-----. 1 oracle oinstall 11328 Jan 26  2017 deinstall.ouibak
    -rwxr-x---. 1 oracle oinstall 32731 Jul 14  2016 deinstall.pl
    -rw-r-----. 1 oracle oinstall  8800 Sep 26  2015 deinstall.xml
    drwxr-xr-x. 2 oracle oinstall   102 Jul 15 10:24 jlib
    -rw-r-----. 1 oracle oinstall   401 Feb 10  2012 readme.txt
    drwxr-xr-x. 2 oracle oinstall    32 Jan 26  2017 response
    -rwxr-x---. 1 oracle oinstall 33333 Jan  7  2015 sshUserSetup.sh
    drwxr-xr-x. 2 oracle oinstall    33 Jan 26  2017 utl
    [oracle@oraclelab3 deinstall]$ cd
    [oracle@oraclelab3 ~]$ /u01/app/12.2.0.1/grid/deinstall/deinstall/deinstall
    -bash: /u01/app/12.2.0.1/grid/deinstall/deinstall/deinstall: Not a directory
    [oracle@oraclelab3 ~]$ /u01/app/12.2.0.1/grid/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /u01/app/oraInventory/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.1/grid
    Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
    Oracle Base selected for deinstall is: /u01/app/oracle
    Checking for existence of central inventory location /u01/app/oraInventory
    Checking for existence of the Oracle Grid Infrastructure home /u01/app/19.0.0.0/grid

    ## [END] Install check configuration ##

    Traces log file: /u01/app/oraInventory/logs//crsdc_2021-07-16_08-18-10-AM.log

    Network Configuration check config START

    Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2021-07-16_08-18-10-AM.log

    Network Configuration check config END

    Asm Check Configuration START

    ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2021-07-16_08-18-11-AM.log

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

    Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2021-07-16_08-18-11-AM.log

    Database Check Configuration END

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

    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Grid Infrastructure Home is: /u01/app/19.0.0.0/grid
    Oracle Home selected for deinstall is: /u01/app/12.2.0.1/grid
    Inventory Location where the Oracle home registered is: /u01/app/oraInventory
    The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/19.0.0.0/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: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-18-08-AM.out'
    Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-18-08-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2021-07-16_08-18-45-AM.log
    ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2021-07-16_08-18-45-AM.log
    ASM Clean Configuration END

    Network Configuration clean config START

    Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2021-07-16_08-18-45-AM.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 "oraclelab3".

    /u01/app/12.2.0.1/grid/crs/install/roothas.sh -unlock -hahome /u01/app/12.2.0.1/grid -paramfile "/tmp/deinstall2021-07-16_08-17-53AM/response/deinstall_OraGI12Home1.rsp"

    Press Enter after you finish running the above commands

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

    ***************************************************************
    Note:
    ***************************************************************
    Take a new session and run the above command:
    [root@oraclelab3 ~]# /u01/app/12.2.0.1/grid/crs/install/roothas.sh -unlock -hahome /u01/app/12.2.0.1/grid -paramfile "/tmp/deinstall2021-07-16_08-17-53AM/response/deinstall_OraGI12Home1.rsp"
    Using configuration parameter file: /tmp/deinstall2021-07-16_08-17-53AM/response/deinstall_OraGI12Home1.rsp
    The log of current session can be found at:
      /u01/app/oraInventory/logs/haunlock__2021-07-16_08-19-23AM.log
    2021/07/16 08:19:29 CLSRSC-347: Successfully unlock /u01/app/12.2.0.1/grid
    [root@oraclelab3 ~]#
    ***************************************************************
    ***************************************************************

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

    ####################### DECONFIG CLEAN OPERATION SUMMARY #######################
    The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/19.0.0.0/grid)
    Oracle Restart was successfully unlocked on node "oraclelab3".
    #######################################################################

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

    Using properties file /tmp/deinstall2021-07-16_08-17-53AM/response/deinstall_2021-07-16_08-18-08-AM.rsp
    Location of logs /u01/app/oraInventory/logs/

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

    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-18-08-AM.out'
    Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2021-07-16_08-18-08-AM.err'

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oraclelab3
    Setting CRS_HOME to false
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-16_08-17-53AM/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.1/grid' from the central inventory on the local node : Done

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

    The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/19.0.0.0/grid'.

    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.1/grid' from the central inventory on the local node.
    Successfully deleted directory '/u01/app/12.2.0.1/grid' on the local node.
    Oracle Universal Installer cleanup was successful.

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

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

    [oracle@oraclelab3 ~]$

    [oracle@oraclelab3 ~]$ cd /u01/app/oraInventory/ContentsXML
    [oracle@oraclelab3 ContentsXML]$ ll
    total 16
    -rw-rw----. 1 oracle oinstall 329 Jul 16 08:20 comps.xml
    -rw-rw----. 1 oracle oinstall 756 Jul 16 08:19 inventory.xml
    -rw-rw----. 1 oracle oinstall 292 Jul 16 08:20 libs.xml
    -rw-rw----. 1 oracle oinstall 174 Jul 15 10:49 oui-patch.xml
    [oracle@oraclelab3 ContentsXML]$ cat inventory.xml
    <?xml version="1.0" standalone="yes" ?>
    <!-- Copyright (c) 1999, 2021, Oracle and/or its affiliates.
    All rights reserved. -->
    <!-- Do not modify the contents of this file by hand. -->
    <INVENTORY>
    <VERSION_INFO>
       <SAVED_WITH>12.2.0.1.4</SAVED_WITH>
       <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
    </VERSION_INFO>
    <HOME_LIST>
    <HOME NAME="OraGI19Home1" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="3" CRS="true"/>
    <HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19.0.0.0/dbhome_1" TYPE="O" IDX="4"/>
    <HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0.1/dbhome_1" TYPE="O" IDX="2" REMOVED="T"/>
    <HOME NAME="OraGI12Home1" LOC="/u01/app/12.2.0.1/grid" TYPE="O" IDX="1" REMOVED="T"/>
    </HOME_LIST>
    <COMPOSITEHOME_LIST>
    </COMPOSITEHOME_LIST>
    </INVENTORY>
    [oracle@oraclelab3 ContentsXML]$ cd /u01/app/12.2.0.1/
    [oracle@oraclelab3 12.2.0.1]$ ll
    total 0
    [oracle@oraclelab3 12.2.0.1]$

    Regards,
    Mallik

    Drop Database Manually or Drop Database Using dbca and Deinstall/Uninstall Oracle Home

    We can drop database and Deinstall Oracle Home:


    We can drop database using:

    1. Using command line - Manual method - "drop database"
    2. Using GUI mode - Using dbca 
    3. Using OEM 

    [root@oraclelab3 ~]# ps -ef|grep smon
    root      4528  4417  0 02:33 pts/2    00:00:00 grep --color=auto smon
    oracle   14849     1  0 Jul05 ?        00:00:10 ora_smon_DEVDB
    oracle   16256     1  0 Jul05 ?        00:00:10 ora_smon_DEV
    oracle   19041     1  0 Jul05 ?        00:00:12 ora_smon_TESTDB
    [root@oraclelab3 ~]#

    [root@oraclelab3 ~]# cat /etc/oratab
    #
    # This file is used by ORACLE utilities.  It is created by root.sh
    # and updated by either Database Configuration Assistant while creating
    # a database or ASM Configuration Assistant while creating ASM instance.

    # A colon, ':', is used as the field terminator.  A new line terminates
    # the entry.  Lines beginning with a pound sign, '#', are comments.
    #
    # Entries are of the form:
    #   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    #
    # The first and second fields are the system identifier and home
    # directory of the database respectively.  The third field indicates
    # to the dbstart utility that the database should , "Y", or should not,
    # "N", be brought up at system boot time.
    #
    # Multiple entries with the same $ORACLE_SID are not allowed.
    #
    #
    TESTDB:/u01/app/oracle/product/19.0.0.0/dbhome_1:N
    DEVDB:/u01/app/oracle/product/19.0.0.0/dbhome_1:N
    DEV:/u01/app/oracle/product/19.0.0.0/dbhome_1:N
    [root@oraclelab3 ~]# 


    Demo:

    1. Drop DEVDB using manually command 
    2. Drop DEV and TESTDB using dbca GUI mode.


    DEVDB:

    [oracle@oraclelab3 ~]$ . oraenv
    ORACLE_SID = [oracle] ? DEVDB
    The Oracle base has been set to /u01/app/oracle
    [oracle@oraclelab3 ~]$ sqlplus / as sysdba

    SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 15 02:36:38 2021
    Version 19.3.0.0.0

    Copyright (c) 1982, 2019, Oracle.  All rights reserved.

    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0

    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.

    SQL> startup mount exclusive restrict;
    ORACLE instance started.

    Total System Global Area 2432695144 bytes
    Fixed Size                  8899432 bytes
    Variable Size             536870912 bytes
    Database Buffers         1879048192 bytes
    Redo Buffers                7876608 bytes
    Database mounted.
    SQL> drop database;

    Database dropped.

    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    SQL> 

    DEV and TESTDB:

    ./dbca and sleeted delete option to drop the database

    Cleanup OR Deinstall/Uninstall Oracle Home:

    [oracle@oraclelab3 ~]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/deinstall/
    [oracle@oraclelab3 deinstall]$ ll
    total 172
    -rw-r-----. 1 oracle oinstall 55480 Apr 17  2019 bootstrap_files.lst
    -rwxr-x---. 1 oracle oinstall 14927 Apr 17  2019 bootstrap.pl
    -rwxr-x---. 1 oracle oinstall 11245 Jul  5 00:31 deinstall
    -rwxr-x---. 1 oracle oinstall 33171 Apr 17  2019 deinstall.pl
    -rw-r-----. 1 oracle oinstall  8479 Sep 19  2017 deinstall.xml
    drwxr-xr-x. 2 oracle oinstall   102 Apr 17  2019 jlib
    -rw-r-----. 1 oracle oinstall   401 Feb 10  2012 readme.txt
    drwxr-xr-x. 2 oracle oinstall    32 Apr 17  2019 response
    -rwxr-x---. 1 oracle oinstall 33333 Jan  7  2015 sshUserSetup.sh
    drwxr-xr-x. 2 oracle oinstall    33 Apr 17  2019 utl
    [oracle@oraclelab3 deinstall]$ cd
    [oracle@oraclelab3 ~]$ 

    [oracle@oraclelab3 ~]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /tmp/deinstall2021-07-15_02-44-17AM/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.0/dbhome_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-07-15_02-44-17AM/logs/netdc_check2021-07-15_02-44-30AM.log

    Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER_DEVDB]:

    Network Configuration check config END

    Database Check Configuration START

    Database de-configuration trace file location: /tmp/deinstall2021-07-15_02-44-17AM/logs/databasedc_check2021-07-15_02-44-30AM.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

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

    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Home selected for deinstall is: /u01/app/oracle/product/19.0.0.0/dbhome_1
    Inventory Location where the Oracle home registered is: /u01/app/oraInventory
    Following Single Instance listener(s) will be de-configured: LISTENER_DEVDB
    Do you want to continue (y - yes, n - no)? [n]: y
    A log of this session will be written to: '/tmp/deinstall2021-07-15_02-44-17AM/logs/deinstall_deconfig2021-07-15_02-44-28-AM.out'
    Any error messages from this session will be written to: '/tmp/deinstall2021-07-15_02-44-17AM/logs/deinstall_deconfig2021-07-15_02-44-28-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /tmp/deinstall2021-07-15_02-44-17AM/logs/databasedc_clean2021-07-15_02-44-30AM.log

    Network Configuration clean config START

    Network de-configuration trace file location: /tmp/deinstall2021-07-15_02-44-17AM/logs/netdc_clean2021-07-15_02-44-30AM.log

    De-configuring Single Instance listener(s): LISTENER_DEVDB

    De-configuring listener: LISTENER_DEVDB
        Stopping listener: LISTENER_DEVDB
        Listener stopped successfully.
        Deleting listener: LISTENER_DEVDB
        Listener deleted successfully.
    Listener 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 #######################
    Following Single Instance listener(s) were de-configured successfully: LISTENER_DEVDB
    #######################################################################

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

    Using properties file /tmp/deinstall2021-07-15_02-44-17AM/response/deinstall_2021-07-15_02-44-28-AM.rsp
    Location of logs /tmp/deinstall2021-07-15_02-44-17AM/logs/

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

    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/tmp/deinstall2021-07-15_02-44-17AM/logs/deinstall_deconfig2021-07-15_02-44-28-AM.out'
    Any error messages from this session will be written to: '/tmp/deinstall2021-07-15_02-44-17AM/logs/deinstall_deconfig2021-07-15_02-44-28-AM.err'

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oraclelab3
    Setting CRS_HOME to false
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-15_02-44-17AM/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.0/dbhome_1' from the central inventory on the local node : Done

    Delete directory '/u01/app/oracle/product/19.0.0.0/dbhome_1' on the local node : Done

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

    The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is not empty. User needs to manually cleanup this directory.

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

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

    Run 'rm -r /opt/ORCLfmap' as root on node(s) 'oraclelab3' at the end of the session.
    Run 'rm -r /etc/oratab' as root on node(s) 'oraclelab3' at the end of the session.
    Review the permissions and contents of '/u01/app/oracle' on nodes(s) 'oraclelab3'.
    If there are no Oracle home(s) associated with '/u01/app/oracle', manually delete '/u01/app/oracle' and its contents.
    Oracle deinstall tool successfully cleaned up temporary directories.
    #######################################################################

    ############# ORACLE DEINSTALL TOOL END #############
    [oracle@oraclelab3 ~]$

    [root@oraclelab3 ~]# rm -r /etc/oraInst.loc
    rm: remove regular file ‘/etc/oraInst.loc’? y
    [root@oraclelab3 ~]# rm -r /opt/ORCLfmap
    rm: descend into directory ‘/opt/ORCLfmap’? y
    rm: descend into directory ‘/opt/ORCLfmap/prot1_64’? y
    rm: descend into directory ‘/opt/ORCLfmap/prot1_64/bin’? y
    rm: remove regular file ‘/opt/ORCLfmap/prot1_64/bin/fmputl’? y
    rm: remove regular file ‘/opt/ORCLfmap/prot1_64/bin/fmputlhp’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64/bin’? y
    rm: descend into directory ‘/opt/ORCLfmap/prot1_64/etc’? y
    rm: remove regular file ‘/opt/ORCLfmap/prot1_64/etc/filemap.ora’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64/etc’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64/log’? y
    rm: remove directory ‘/opt/ORCLfmap/prot1_64’? y
    rm: remove directory ‘/opt/ORCLfmap’? y
    [root@oraclelab3 ~]# rm -r /etc/oratab
    rm: remove regular file ‘/etc/oratab’? y
    [root@oraclelab3 ~]#

    Post Verification:

    [oracle@oraclelab3 ~]$ cat /etc/oratab
    cat: /etc/oratab: No such file or directory

    [oracle@oraclelab3 ~]$ cat /etc/oraInst.loc
    cat: /etc/oraInst.loc: No such file or directory

    [oracle@oraclelab3 ~]$ cd /u01/app/oracle/product/19.0.0.0
    [oracle@oraclelab3 19.0.0.0]$ cd ../../..
    [oracle@oraclelab3 app]$ ll
    total 0
    drwxr-xr-x. 5 oracle oinstall 49 Jul 15 02:45 oracle
    [oracle@oraclelab3 app]$


    Regards,
    Mallik

    🌟 Proud to be an Oracle ACE Pro! 🚀

    🌟 Proud to be an Oracle ACE Pro! 🚀 I’m excited to share my official Oracle ACE Profile with the Oracle community. 👨‍💻 Mallikarjun ...