How to RU Patch Deinstallation

Hello Guys !

I’m here again, to give an small explanation of why, we need know how to deinstall an Release Update.

Why ?

It’s depends, on my case, the last RU had some issues in the import datapump.

After review all cases and aply some workarounds, and debug and review all logs and traces with the ADRCI tool to stay sure of my desicion, deinstall.

Additional Documentation

I review the oracle document from MOS: Database 19c Release Updates and Revisions Bugs Fixed Lists (Doc ID 2523220.1)

Hands on

The first step is verificate the number of the RU, to start with the procediment:

select CON_ID,
TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time,
PATCH_ID,
PATCH_TYPE,
ACTION,
DESCRIPTION,
SOURCE_VERSION,
TARGET_VERSION
from CDB_REGISTRY_SQLPATCH
order by CON_ID, action_time, patch_id;

This query help us, with the list of the number, to verified the last patch applied.

The result show me the number:

    CON_ID ACTION_TIME    PATCH_ID PATCH_TYPE ACTION     DESCRIPTION                      SOURCE_VERSION  TARGET_VERSION
---------- ------------ ---------- ---------- ---------- -------------------------------- --------------- ---------------
         1 2019-11-21     29517242 RU         APPLY      Database Release Update : 19.3.0 19.1.0.0.0      19.3.0.0.0
                                                         .0.190416 (29517242)

         1 2019-11-22     30125133 RU         APPLY      Database Release Update : 19.5.0 19.3.0.0.0      19.5.0.0.0
                                                         .0.191015 (30125133)

         2 2019-11-21     29517242 RU         APPLY      Database Release Update : 19.3.0 19.1.0.0.0      19.3.0.0.0
                                                         .0.190416 (29517242)

         2 2019-11-22     30125133 RU         APPLY      Database Release Update : 19.5.0 19.3.0.0.0      19.5.0.0.0
                                                         .0.191015 (30125133)

         3 2019-11-21     29517242 RU         APPLY      Database Release Update : 19.3.0 19.1.0.0.0      19.3.0.0.0
                                                         .0.190416 (29517242)

         3 2019-11-22     30125133 RU         APPLY      Database Release Update : 19.5.0 19.3.0.0.0      19.5.0.0.0
                                                         .0.191015 (30125133)


6 rows selected.

So, we start with the deinstallation:

  • Shutdown the database.
./opatch rollback -id 30125133
oracle@DSORA02:/u01/app/oracle/product/19.0.0/dbhome_1/OPatch $ ./opatch rollback -id 30125133
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-04-06_13-25-43PM_1.log


Patches will be rolled back in the following order:
   30125133
The following patch(es) will be rolled back: 30125133

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/19.0.0/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y

Rolling back patch 30125133...

RollbackSession rolling back interim patch '30125133' from OH '/u01/app/oracle/product/19.0.0/dbhome_1'

Patching component oracle.rdbms, 19.0.0.0.0...
Deleting "kpdbapx.o" from archive "/u01/app/oracle/product/19.0.0/dbhome_1/lib/libserver19.a"

Patching component oracle.rdbms.rsf, 19.0.0.0.0...
Deleting "psdufa.o" from archive "/u01/app/oracle/product/19.0.0/dbhome_1/lib/libplc19_pic.a"

Patching component oracle.assistants.acf, 19.0.0.0.0...
Patching component oracle.assistants.deconfig, 19.0.0.0.0...
Patching component oracle.assistants.server, 19.0.0.0.0...
Patching component oracle.buildtools.rsf, 19.0.0.0.0...
Patching component oracle.ctx, 19.0.0.0.0...
Patching component oracle.ldap.rsf, 19.0.0.0.0...
Patching component oracle.network.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.sdo, 19.0.0.0.0...
Patching component oracle.sqlplus, 19.0.0.0.0...
Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...
Patching component oracle.rdbms.rman, 19.0.0.0.0...
Patching component oracle.ctx.atg, 19.0.0.0.0...
Patching component oracle.rdbms.oci, 19.0.0.0.0...
Patching component oracle.rdbms.util, 19.0.0.0.0...
Patching component oracle.xdk, 19.0.0.0.0...
Patching component oracle.ovm, 19.0.0.0.0...
Patching component oracle.network.listener, 19.0.0.0.0...
Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...
Patching component oracle.dbjava.jdbc, 19.0.0.0.0...
Patching component oracle.dbdev, 19.0.0.0.0...
Patching component oracle.rdbms.deconfig, 19.0.0.0.0...
Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...
Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...
Patching component oracle.install.deinstalltool, 19.0.0.0.0...
Patching component oracle.dbjava.ic, 19.0.0.0.0...
Patching component oracle.sdo.locator, 19.0.0.0.0...
Patching component oracle.rdbms.scheduler, 19.0.0.0.0...
Patching component oracle.rdbms.dv, 19.0.0.0.0...
Patching component oracle.ons, 19.0.0.0.0...
Patching component oracle.ldap.security.osdt, 19.0.0.0.0...
Patching component oracle.ctx.rsf, 19.0.0.0.0...
Patching component oracle.duma, 19.0.0.0.0...
Patching component oracle.ldap.owm, 19.0.0.0.0...
Patching component oracle.oracore.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.install.seeddb, 19.0.0.0.0...
Patching component oracle.odbc, 19.0.0.0.0...
Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...
Patching component oracle.network.client, 19.0.0.0.0...
Patching component oracle.sqlplus.ic, 19.0.0.0.0...
Patching component oracle.dbjava.ucp, 19.0.0.0.0...

Patching component oracle.xdk.rsf, 19.0.0.0.0...
Deleting "jznpathval.o" from archive "/u01/app/oracle/product/19.0.0/dbhome_1/lib/libxml19.a"

Patching component oracle.marvel, 19.0.0.0.0...
Patching component oracle.xdk.parser.java, 19.0.0.0.0...
Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...
Patching component oracle.nlsrtl.rsf.core, 19.0.0.0.0...
Patching component oracle.precomp.common, 19.0.0.0.0...

Patching component oracle.precomp.lang, 19.0.0.0.0...
RollbackSession removing interim patch '30125133' from inventory
Inactive sub-set patch [29517242] has become active due to the rolling back of a super-set patch [30125133].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-04-06_13-25-43PM_1.log

OPatch succeeded.
oracle@DSORA02:/u01/app/oracle/product/19.0.0/dbhome_1/OPatch $

As we can view, this 29517242 RU is a part of a subset 30125133:

oracle@DSORA02:/u01/app/oracle/product/19.0.0/dbhome_1/OPatch $ ./opatch rollback -id 30122149
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-04-06_13-58-34PM_1.log


Patches will be rolled back in the following order:
   30122149

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-04-06_13-58-44PM_1.log


Patches will be rolled back in the following order:
   30122149
The following patch(es) will be rolled back: 30122149

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/19.0.0/dbhome_1')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y

Rolling back patch 30122149...

RollbackSession rolling back interim patch '30122149' from OH '/u01/app/oracle/product/19.0.0/dbhome_1'

Patching component oracle.rdbms, 19.0.0.0.0...
Patching component oracle.rhp.common, 19.0.0.0.0...
Patching component oracle.has.db, 19.0.0.0.0...
Patching component oracle.has.rsf, 19.0.0.0.0...
Patching component oracle.rhp.db, 19.0.0.0.0...
Patching component oracle.has.db.cvu, 19.0.0.0.0...
Patching component oracle.has.common, 19.0.0.0.0...

Patching component oracle.has.common.cvu, 19.0.0.0.0...
RollbackSession removing interim patch '30122149' from inventory
Inactive sub-set patch [29585399] has become active due to the rolling back of a super-set patch [30122149].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-04-06_13-58-44PM_1.log

OPatch succeeded.
oracle@DSORA02:/u01/app/oracle/product/19.0.0/dbhome_1/OPatch $

Check with the inventory command the rollback of the patching

./opatch lsinventory
oracle@DSORA02:/u01/app/oracle/product/19.0.0/dbhome_1/OPatch $ ./opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-04-06_14-02-25PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-04-06_14-02-25PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: dsora02.bue299.comafi.com.ar
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 19c                                                  19.0.0.0.0
There are 1 products installed in this Oracle Home.


Interim patches (2) :

Patch  29585399     : applied on Thu Apr 18 04:21:33 ART 2019
Unique Patch ID:  22840393
Patch description:  "OCW RELEASE UPDATE 19.3.0.0.0 (29585399)"
   Created on 9 Apr 2019, 19:12:47 hrs PST8PDT
   Bugs fixed:
     27222128, 27572040, 27604329, 27760043, 27877830, 28302580, 28470673
     28621543, 28642469, 28699321, 28710663, 28755846, 28772816, 28785321
     ...............
     RESUMABLE INFO
     ..............
     29357821, 29360467, 29360775, 29367971, 29368725, 29379299, 29379381
     29380527, 29381000, 29382296, 29391301, 29393649, 29402110, 29411931
     29413360, 29457319, 29465047

Patch  29517242     : applied on Thu Apr 18 04:21:17 ART 2019
Unique Patch ID:  22862832
Patch description:  "Database Release Update : 19.3.0.0.190416 (29517242)"
   Created on 17 Apr 2019, 23:27:10 hrs PST8PDT
   Bugs fixed:
     29515240, 14735102, 19697993, 20313356, 21965541, 25806201, 25883179
     25986062, 26476244, 26611353, 26872233, 27369515, 27423500, 27666312
     27710072, 27846298, 27957203, 28064977, 28072567, 28129791, 28181021
     28210681, 28279456, 28313275, 28350595, 28371123, 28379065, 28431445
     ...............
     RESUMABLE INFO
     ..............
     29429566, 29431485, 29435652, 29438736, 29439522, 29450421, 29451386
     29452576, 29452953, 29457807, 29460252, 29462957, 29486181, 29507616
     29521748, 29530812, 29531654, 29557336, 29558975, 29601461



--------------------------------------------------------------------------------

OPatch succeeded.
oracle@DSORA02:/u01/app/oracle/product/19.0.0/dbhome_1/OPatch $