Patching all my environments with the January 2022 Patch Bundles

It’s patching time. When I checked an SR and had a quick discussion with a customer yesterday, Peter reminded me that it’s patching day. And at about 20:00h CET the new patch bundles appeared on MOS. So let me show you again Patching all my environments with the January 2022 Patch Bundles for 11.2.0.4, 12.2.0.1, 19c and 21c.

As usual, an important annotation upfront: I patch in-place due to space issues. But in reality, you please patch always out-of-place with a separate home. Please see this blog post about how to apply the RU directly when you provision a new home with OUI.

Security Alert January 2022

You will find the January 2022 Security Alerts for all products here. And as usual, please pay close attention to the Database Server Products Risk Matrix. You will find the usual suspects but this time not many fixes and relatively low risk scores. Still, my advice is be to apply the patch bundles to your environments if you haven’t done so already.

Patching all my environments with the January 2022 Patch Bundles

Regarding the log4j topic, please find further information in the alert.

You may realize that neither 11.2.0.4 nor 18c are mentioned in the risk matrix anymore. As both are out of Premier or Extended Support, there are no regular patch bundles anymore. But the issues noted in the risk matrix may happen in both these releases, and potentially in older releases as well.

Database Patch Bundles

You will find the links to the individual patch bundles in  MOS Note: 2817011.1 – Critical Patch Update (CPU) Program Jan 2022 Patch Availability Document (PAD). But you can use as well MOS Note: 2118136.2 – Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases to download “your” bundle.

Do I need a new OPatch?

And then it is time again for the opatch check. Without even seeing the number, I can tell you that you MUST refresh your opatch since there is a significant performance improvement in the 28 version on all platforms. But let me double check with the READMEs:

  • 21.5.0 requires opatch 12.2.0.1.28 or later
  • 19.14.0 requires opatch 12.2.0.1.28 or later
  • 12.2.0.1 January 2022 requires opatch 12.2.0.1.28 or later
  • 11.2.0.4 January 2022 requires opatch 11.2.0.3.32  or later

Hence, I will update opatch in all my homes. The 6880880 link from the readmes takes you directly to the correct download. And it may not wonder you, all three opatch releases for 12.2 – 21c are identical even though all sail with different display labels on MOS. So it is fairly enough in my case to download it only once.

Wipe out your current OPatch directory in your homes. Once you unzip the new OPatch bundles. you can proceed.

Applying RU 21.5.0 to my 21c home

I always do something you shouldn’t do. I apply the patch to my existing home. This has to do with the available space in my lab environment. You please provide a new home and apply the patch(es) right away as I describe here.

Patching my 21c database home to RU 21.5.0 is pretty straight forward.

  1. Conflict and space checks

    $ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    PREREQ session
    
    Oracle Home       : /u01/app/oracle/product/21
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/21/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.9.0
    Log file location : /u01/app/oracle/product/21/cfgtoollogs/opatch/opatch2022-01-19_13-32-26PM_1.log
    
    Invoking prereq "checkconflictagainstohwithdetail"
    
    Prereq "checkConflictAgainstOHWithDetail" passed.
    
    OPatch succeeded.
    
    
    $ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -ph ./
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    PREREQ session
    
    Oracle Home       : /u01/app/oracle/product/21
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/21/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.9.0
    Log file location : /u01/app/oracle/product/21/cfgtoollogs/opatch/opatch2022-01-19_13-33-25PM_1.log
    
    Invoking prereq "checksystemspace"
    
    Prereq "checkSystemSpace" passed.
    
    OPatch succeeded.
    

    All set – we are good to go.

  2. opatch apply

    $ $ORACLE_HOME/OPatch/opatch apply
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    
    Oracle Home       : /u01/app/oracle/product/21
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/21/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.9.0
    Log file location : /u01/app/oracle/product/21/cfgtoollogs/opatch/opatch2022-01-19_14-17-44PM_1.log
    
    Verifying environment and performing prerequisite checks...
    OPatch continues with these patches:   33516412  
    
    Do you want to proceed? [y|n]
    y
    User Responded with: Y
    All checks passed.
    
    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
    (Oracle Home = '/u01/app/oracle/product/21')
    
    
    Is the local system ready for patching? [y|n]
    y
    User Responded with: Y
    Backing up files...
    Applying interim patch '33516412' to OH '/u01/app/oracle/product/21'
    ApplySession: Optional component(s) [ oracle.network.gsm, 21.0.0.0.0 ] , [ oracle.tfa, 21.0.0.0.0 ] , [ oracle.net.cman, 21.0.0.0.0 ] , [ oracle.ons.cclient, 21.0.0.0.0 ] , [ oracle.rdbms.ic, 21.0.0.0.0 ] , [ oracle.sdo.companion, 21.0.0.0.0 ] , [ oracle.duma, 21.0.0.0.0 ] , [ oracle.network.cman, 21.0.0.0.0 ] , [ oracle.ons.eons.bwcompat, 21.0.0.0.0 ] , [ oracle.jdk, 1.8.0.271.00 ]  not present in the Oracle Home or a higher version is found.
    
    Patching component oracle.rdbms.rsf, 21.0.0.0.0...
    
    Patching component oracle.network.rsf, 21.0.0.0.0...
    
    Patching component oracle.rdbms, 21.0.0.0.0...
    
    Patching component oracle.dbjava.ic, 21.0.0.0.0...
    
    Patching component oracle.dbjava.jdbc, 21.0.0.0.0...
    
    Patching component oracle.dbjava.ucp, 21.0.0.0.0...
    
    Patching component oracle.has.common.cvu, 21.0.0.0.0...
    
    Patching component oracle.ldap.owm, 21.0.0.0.0...
    
    Patching component oracle.ldap.rsf, 21.0.0.0.0...
    
    Patching component oracle.ldap.rsf.ic, 21.0.0.0.0...
    
    Patching component oracle.ldap.security.osdt, 21.0.0.0.0...
    
    Patching component oracle.nlsrtl.rsf, 21.0.0.0.0...
    
    Patching component oracle.oraml.server, 21.0.0.0.0...
    
    Patching component oracle.rdbms.dbscripts, 21.0.0.0.0...
    
    Patching component oracle.rdbms.deconfig, 21.0.0.0.0...
    
    Patching component oracle.rdbms.rman, 21.0.0.0.0...
    
    Patching component oracle.rdbms.rsf.ic, 21.0.0.0.0...
    
    Patching component oracle.sqlplus, 21.0.0.0.0...
    
    Patching component oracle.tfa.db, 21.0.0.0.0...
    
    Patching component oracle.ons, 21.0.0.0.0...
    
    Patching component oracle.ctx.rsf, 21.0.0.0.0...
    
    Patching component oracle.sqlplus.ic, 21.0.0.0.0...
    
    Patching component oracle.sdo.locator, 21.0.0.0.0...
    
    Patching component oracle.assistants.server, 21.0.0.0.0...
    
    Patching component oracle.sdo.locator.jrf, 21.0.0.0.0...
    
    Patching component oracle.ldap.ssl, 21.0.0.0.0...
    
    Patching component oracle.rdbms.dv, 21.0.0.0.0...
    
    Patching component oracle.rdbms.scheduler, 21.0.0.0.0...
    
    Patching component oracle.xdk.parser.java, 21.0.0.0.0...
    
    Patching component oracle.xdk.rsf, 21.0.0.0.0...
    
    Patching component oracle.ctx, 21.0.0.0.0...
    
    Patching component oracle.rdbms.crs, 21.0.0.0.0...
    
    Patching component oracle.sdo, 21.0.0.0.0...
    
    Patching component oracle.rdbms.util, 21.0.0.0.0...
    
    Patching component oracle.ons.ic, 21.0.0.0.0...
    
    Patching component oracle.javavm.server, 21.0.0.0.0...
    
    Patching component oracle.javavm.server.core, 21.0.0.0.0...
    
    Patching component oracle.xdk, 21.0.0.0.0...
    
    Patching component oracle.assistants.acf, 21.0.0.0.0...
    
    Patching component oracle.rdbms.oci, 21.0.0.0.0...
    
    Patching component oracle.assistants.deconfig, 21.0.0.0.0...
    
    Patching component oracle.precomp.common, 21.0.0.0.0...
    
    Patching component oracle.precomp.lang, 21.0.0.0.0...
    
    Patching component oracle.jdk, 1.8.0.291.09...
    Patch 33516412 successfully applied.
    Sub-set patch [33197565] has become inactive due to the application of a super-set patch [33516412].
    Sub-set patch [33239276] has become inactive due to the application of a super-set patch [33516412].
    Please refer to Doc ID 2161861.1 for any possible further required actions.
    Log file location: /u01/app/oracle/product/21/cfgtoollogs/opatch/opatch2022-01-19_14-17-44PM_1.log
    
    OPatch succeeded.

    Please note that with Oracle Database 21c there is no separate OJVM bundle anymore needed. Everything is included into the regular RU.

  3. datapatch

    $ $ORACLE_HOME/OPatch/datapatch -verbose
    SQL Patching tool version 21.5.0.0.0 Production on Wed Jan 19 14:25:25 2022
    Copyright (c) 2012, 2022, Oracle.  All rights reserved.
    
    Log file for this invocation: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/sqlpatch/sqlpatch_8201_2022_01_19_14_25_25/sqlpatch_invocation.log
    
    Connecting to database...OK
    Gathering database info...done
    
    Note:  Datapatch will only apply or rollback SQL fixes for PDBs
           that are in an open state, no patches will be applied to closed PDBs.
           Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
           (Doc ID 1585822.1)
    
    Bootstrapping registry and package to current versions...done
    Determining current state...done
    
    Current state of interim SQL patches:
      No interim patches found
    
    Current state of release update SQL patches:
      Binary registry:
        21.5.0.0.0 Release_Update 220107185933: Installed
      PDB CDB$ROOT:
        Applied 21.4.0.0.0 Release_Update 211006052306 successfully on 15-DEC-21 10.22.32.516540 PM
      PDB PDB$SEED:
        Applied 21.4.0.0.0 Release_Update 211006052306 successfully on 15-DEC-21 10.22.32.914473 PM
    
    Adding patches to installation queue and performing prereq checks...done
    Installation queue:
      For the following PDBs: CDB$ROOT PDB$SEED
        No interim patches need to be rolled back
        Patch 33516412 (Database Release Update : 21.5.0.0.220118 (33516412)):
          Apply from 21.4.0.0.0 Release_Update 211006052306 to 21.5.0.0.0 Release_Update 220107185933
        No interim patches need to be applied
    
    Installing patches...
    Patch installation complete.  Total patches installed: 2
    
    Validating logfiles...done
    Patch 33516412 apply (pdb CDB$ROOT): SUCCESS
      logfile: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/sqlpatch/33516412/24589362/33516412_apply_CDB3_CDBROOT_2022Jan19_14_25_36.log (no errors)
    Patch 33516412 apply (pdb PDB$SEED): SUCCESS
      logfile: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/sqlpatch/33516412/24589362/33516412_apply_CDB3_PDBSEED_2022Jan19_14_26_39.log (no errors)
    SQL Patching tool complete on Wed Jan 19 14:27:24 2022
    
    

    Don’t forget to startup the database and all PDBs at first.

  4. Enabling new optimizer fixes

    SQL*Plus: Release 21.0.0.0.0 - Production on Wed Jan 19 14:28:39 2022
    Version 21.5.0.0.0
    
    Copyright (c) 1982, 2021, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
    Version 21.5.0.0.0
    
    SQL> set serveroutput on;
    SQL> execute dbms_optim_bundle.getBugsforBundle;
    
    21.5.0.0.220118DBRU:
        Bug: 32913527,  fix_controls: 32913527
        Bug: 32766397,  fix_controls: 32766397
        Bug: 31912834,  fix_controls: 31912834
        Bug: 33145153,  fix_controls: 33145153
        Bug: 31843716,  fix_controls: 31843716
        Bug: 32212062,  fix_controls: 32212062
        Bug: 33613512,  fix_controls: 31880080
    
    PL/SQL procedure successfully completed.
    
    SQL> execute dbms_optim_bundle.enable_optim_fixes('ON','BOTH', 'YES')
    DBMS_OPTIM command:  dbms_optim_bundle.enable_optim_fixes('ON', 'BOTH', 'YES')
    
    Bundle's _fix_control setting as per action:ON
    31988833:1  32800137:0	32408640:1  29738374:1	33325981:1  32913527:0
    32766397:0  31912834:1	33145153:1  31843716:0	32212062:0  31880080:0
    
    Taking current instance CDB3 as base, details on _fix_control setting for
    CON_ID 1 :
    
    1) Current _fix_control setting for spfile:
    31988833:1  32800137:0	32408640:1  29738374:1	33325981:1
    
    2) Final _fix_control setting for spfile considering current_setting_precedence
    is YES
    31988833:1  32800137:0	32408640:1  29738374:1	33325981:1  32913527:0
    32766397:0  31912834:1	33145153:1  31843716:0	32212062:0  31880080:0
    
    3) Current _fix_control setting in memory:
    31988833:1  32800137:0	32408640:1  29738374:1	33325981:1  32913527:0
    32766397:0  31912834:0	33145153:0  31843716:0	32212062:0  31880080:0
    
    4) Final _fix_control setting for memory considering current_setting_precedence
    is YES
    31988833:1  32800137:0	32408640:1  29738374:1	33325981:1  32913527:0
    32766397:0  31912834:0	33145153:0  31843716:0	32212062:0  31880080:0
    
    WARNING: final _fix_control setting for memory is not same as final
    _fix_control setting for spfile. Please look at point 2 and 4 above to see the
    differences.
    
    PL/SQL procedure successfully completed.
    

    New optimizer fixes are there for a reason. But it is your choice whether you’d like to enable them after patching, or keep them disabled. Just make sure when you upgrade or create a new database to always enable them.

Applying RU 19.14.0 to my 19c home

Next step is patching my 19c environment. And again I see the same waiting times in opatch I have seen during Patching my environments with the October 2021 Bundle Patches when opatch does “Verifying environment and performing prerequisite checks…“. And badly enough, this check happens twice for no deeeper reason during the opatch apply run – it wastes about 10 minutes in my environment.

  1. Conflict and space checks

    $ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    PREREQ session
    
    Oracle Home       : /u01/app/oracle/product/19
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/19/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.7.0
    Log file location : /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_21-08-02PM_1.log
    
    Invoking prereq "checkconflictagainstohwithdetail"
    
    Prereq "checkConflictAgainstOHWithDetail" passed.
    
    OPatch succeeded.
    
    
    $ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -ph ./
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    PREREQ session
    
    Oracle Home       : /u01/app/oracle/product/19
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/19/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.7.0
    Log file location : /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_21-19-06PM_1.log
    
    Invoking prereq "checksystemspace"
    
    Prereq "checkSystemSpace" passed.
    
    OPatch succeeded.
    

     

  2. opatch apply

    $ $ORACLE_HOME/OPatch/opatch apply
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    
    Oracle Home       : /u01/app/oracle/product/19
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/19/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.7.0
    Log file location : /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_21-25-44PM_1.log
    
    Verifying environment and performing prerequisite checks...
    
    --------------------------------------------------------------------------------
    Start OOP by Prereq process.
    Launch OOP...
    
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    
    Oracle Home       : /u01/app/oracle/product/19
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/19/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.7.0
    Log file location : /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_21-31-23PM_1.log
    
    Verifying environment and performing prerequisite checks...
    OPatch continues with these patches:   33515361  
    
    Do you want to proceed? [y|n]
    y
    User Responded with: Y
    All checks passed.
    
    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
    (Oracle Home = '/u01/app/oracle/product/19')
    
    
    Is the local system ready for patching? [y|n]
    y
    User Responded with: Y
    Backing up files...
    Applying interim patch '33515361' to OH '/u01/app/oracle/product/19'
    ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.ons.cclient, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 19.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.ons.eons.bwcompat, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ]  not present in the Oracle Home or a higher version is found.
    
    Patching component oracle.help.ohj, 11.1.1.7.0...
    
    Patching component oracle.perlint, 5.28.1.0.0...
    
    Patching component oracle.rdbms.locator, 19.0.0.0.0...
    
    Patching component oracle.perlint.expat, 2.0.1.0.4...
    
    ...
    
    Patching component oracle.rdbms.rsf.ic, 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...
    
    Patching component oracle.jdk, 1.8.0.201.0...
    Patch 33515361 successfully applied.
    Sub-set patch [33197296] has become inactive due to the application of a super-set patch [33515361].
    Sub-set patch [33192793] has become inactive due to the application of a super-set patch [33515361].
    Please refer to Doc ID 2161861.1 for any possible further required actions.
    Log file location: /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_21-31-23PM_1.log
    
    OPatch succeeded.
    

     

  3. datapatch

    $ $ORACLE_HOME/OPatch/datapatch -verbose
    SQL Patching tool version 19.14.0.0.0 Production on Wed Jan 19 21:46:51 2022
    Copyright (c) 2012, 2021, Oracle.  All rights reserved.
    
    Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_29286_2022_01_19_21_46_51/sqlpatch_invocation.log
    
    Connecting to database...OK
    Gathering database info...done
    
    Note:  Datapatch will only apply or rollback SQL fixes for PDBs
           that are in an open state, no patches will be applied to closed PDBs.
           Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
           (Doc ID 1585822.1)
    
    Bootstrapping registry and package to current versions...done
    Determining current state...done
    
    Current state of interim SQL patches:
    Interim patch 33192694 (OJVM RELEASE UPDATE: 19.13.0.0.211019 (33192694)):
      Binary registry: Installed
      PDB CDB$ROOT: Applied successfully on 16-DEC-21 12.10.22.436110 AM
      PDB PDB$SEED: Applied successfully on 16-DEC-21 12.10.22.446152 AM
    
    Current state of release update SQL patches:
      Binary registry:
        19.14.0.0.0 Release_Update 211225122123: Installed
      PDB CDB$ROOT:
        Applied 19.13.0.0.0 Release_Update 211004165050 successfully on 15-DEC-21 11.32.48.559776 PM
      PDB PDB$SEED:
        Applied 19.13.0.0.0 Release_Update 211004165050 successfully on 15-DEC-21 11.32.49.191356 PM
    
    Adding patches to installation queue and performing prereq checks...done
    Installation queue:
      For the following PDBs: CDB$ROOT PDB$SEED
        No interim patches need to be rolled back
        Patch 33515361 (Database Release Update : 19.14.0.0.220118 (33515361)):
          Apply from 19.13.0.0.0 Release_Update 211004165050 to 19.14.0.0.0 Release_Update 211225122123
        No interim patches need to be applied
    
    Installing patches...
    Patch installation complete.  Total patches installed: 2
    
    Validating logfiles...done
    Patch 33515361 apply (pdb CDB$ROOT): SUCCESS
      logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33515361/24589353/33515361_apply_CDB2_CDBROOT_2022Jan19_21_47_29.log (no errors)
    Patch 33515361 apply (pdb PDB$SEED): SUCCESS
      logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33515361/24589353/33515361_apply_CDB2_PDBSEED_2022Jan19_21_47_54.log (no errors)
    SQL Patching tool complete on Wed Jan 19 21:48:22 2022
    

     

  4. Enabling optimizer fixes

    SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 19 21:52:50 2022
    Version 19.14.0.0.0
    
    Copyright (c) 1982, 2021, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.14.0.0.0
    
    SQL> set serveroutput on
    SQL> execute dbms_optim_bundle.getBugsforBundle;
    
    19.14.0.0.220118DBRU:
        Bug: 31945701,  fix_controls: 31945701
        Bug: 32212062,  fix_controls: 32212062
        Bug: 32766397,  fix_controls: 32766397
        Bug: 32508585,  fix_controls: 32508585
        Bug: 29651517,  fix_controls: 29651517
        Bug: 31912834,  fix_controls: 31912834
        Bug: 33145153,  fix_controls: 33145153
        Bug: 33613512,  fix_controls: 31880080
    
    PL/SQL procedure successfully completed.
    
    SQL> execute dbms_optim_bundle.enable_optim_fixes('ON','BOTH', 'YES')
    DBMS_OPTIM command:  dbms_optim_bundle.enable_optim_fixes('ON', 'BOTH', 'YES')
    
    Bundle's _fix_control setting as per action:ON
    29331066:1  28965084:1	28776811:1  28498976:1	28567417:1  28558645:1
    29132869:1  29450812:1	29687220:1  29939400:1	30232638:1  30001331:0
    29304314:1  29930457:1	30028663:1  28144569:1	28776431:1  27261477:1
    31069997:1  31077481:1	28602253:1  29653132:0	29937655:1  30347410:1
    30602828:1  30896685:0	29487407:1  30998035:1	30786641:1  31444353:0
    30486896:1  28999046:1	30902655:1  30681521:1	29302565:1  30972817:1
    30222669:1  31668694:1	31001490:1  30198239:7	30980115:1  30616738:0
    31895670:0  19138896:1	31670824:0  9876287:1  30564898:1  32075777:0
    30570982:1  32037237:1	30927440:1  30822446:1	24561942:1  31625959:1
    31579233:1  29696242:1	31626438:1  30228422:1	17295505:1  29725425:1
    30618230:1  30008456:1	30537403:1  30235878:1	30646077:1  29657973:1
    29712727:1  20922160:1	30006705:1  29463553:1	30751171:1  31009032:1
    30063629:1  30207519:1	31517502:1  30617002:1	30483217:1  30235691:1
    30568514:1  28414968:3	32014520:1  30249927:1	31580374:1  29590666:0
    29435966:1  28173995:1	29867728:1  30776676:1	26577716:1  30470947:1
    30979701:1  30483184:1	31001295:1  31191224:1	31974424:1  29385774:1
    28234255:3  31459242:0	31082719:1  28708585:1	31821701:1  32107621:1
    26758837:1  31558194:1	30781970:0  30142527:1	31143146:1  31961578:0
    31496840:1  22387320:1	30652595:1  25979242:1	32578113:1  32205825:1
    32408640:1  31988833:1	32800137:0  31360214:1	32913527:0  29738374:1
    33325981:1  31945701:0	32212062:0  32766397:0	32508585:1  29651517:1
    31912834:1  33145153:1	31880080:0
    
    ,,,
    
    WARNING: final _fix_control setting for memory is not same as final
    _fix_control setting for spfile. Please look at point 2 and 4 above to see the
    differences.
    
    PL/SQL procedure successfully completed.
    

    And finally …

  5. OJVM patch
    Since I have the JavaVM in my 19c environment, I add the OJVM RU from January 2022 into this home, too.

    $ $ORACLE_HOME/OPatch/opatch apply
    Oracle Interim Patch Installer version 12.2.0.1.28
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    
    Oracle Home       : /u01/app/oracle/product/19
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/19/oraInst.loc
    OPatch version    : 12.2.0.1.28
    OUI version       : 12.2.0.7.0
    Log file location : /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_22-06-05PM_1.log
    
    Verifying environment and performing prerequisite checks...
    OPatch continues with these patches:   33561310  
    
    Do you want to proceed? [y|n]
    y
    User Responded with: Y
    All checks passed.
    
    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
    (Oracle Home = '/u01/app/oracle/product/19')
    
    
    Is the local system ready for patching? [y|n]
    y
    User Responded with: Y
    Backing up files...
    Applying interim patch '33561310' to OH '/u01/app/oracle/product/19'
    
    Patching component oracle.javavm.server, 19.0.0.0.0...
    
    Patching component oracle.javavm.server.core, 19.0.0.0.0...
    
    Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
    
    Patching component oracle.rdbms, 19.0.0.0.0...
    
    Patching component oracle.javavm.client, 19.0.0.0.0...
    Patch 33561310 successfully applied.
    Sub-set patch [33192694] has become inactive due to the application of a super-set patch [33561310].
    Please refer to Doc ID 2161861.1 for any possible further required actions.
    Log file location: /u01/app/oracle/product/19/cfgtoollogs/opatch/opatch2022-01-19_22-06-05PM_1.log
    
    OPatch succeeded.
    [CDB2] oracle@hol:~/33561310
    $ s
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 19 22:13:08 2022
    Version 19.14.0.0.0
    
    Copyright (c) 1982, 2021, Oracle.  All rights reserved.
    
    Connected to an idle instance.
    
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1577055352 bytes
    Fixed Size		    9135224 bytes
    Variable Size		  570425344 bytes
    Database Buffers	  989855744 bytes
    Redo Buffers		    7639040 bytes
    Database mounted.
    Database opened.
    SQL> alter pluggable database all open;
    
    Pluggable database altered.
    
    SQL> exit
    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.14.0.0.0
    
    [CDB2] oracle@hol:~/33561310
    $ $ORACLE_HOME/OPatch/datapatch -verbose
    SQL Patching tool version 19.14.0.0.0 Production on Wed Jan 19 22:13:40 2022
    Copyright (c) 2012, 2021, Oracle.  All rights reserved.
    
    Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_485_2022_01_19_22_13_40/sqlpatch_invocation.log
    
    Connecting to database...OK
    Gathering database info...done
    
    Note:  Datapatch will only apply or rollback SQL fixes for PDBs
           that are in an open state, no patches will be applied to closed PDBs.
           Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
           (Doc ID 1585822.1)
    
    Bootstrapping registry and package to current versions...done
    Determining current state...done
    
    Current state of interim SQL patches:
    Interim patch 33192694 (OJVM RELEASE UPDATE: 19.13.0.0.211019 (33192694)):
      Binary registry: Not installed
      PDB CDB$ROOT: Applied successfully on 16-DEC-21 12.10.22.436110 AM
      PDB PDB$SEED: Applied successfully on 16-DEC-21 12.10.22.446152 AM
    Interim patch 33561310 (OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310)):
      Binary registry: Installed
      PDB CDB$ROOT: Not installed
      PDB PDB$SEED: Not installed
    
    Current state of release update SQL patches:
      Binary registry:
        19.14.0.0.0 Release_Update 211225122123: Installed
      PDB CDB$ROOT:
        Applied 19.14.0.0.0 Release_Update 211225122123 successfully on 19-JAN-22 09.48.19.540225 PM
      PDB PDB$SEED:
        Applied 19.14.0.0.0 Release_Update 211225122123 successfully on 19-JAN-22 09.48.19.756424 PM
    
    Adding patches to installation queue and performing prereq checks...done
    Installation queue:
      For the following PDBs: CDB$ROOT PDB$SEED
        The following interim patches will be rolled back:
          33192694 (OJVM RELEASE UPDATE: 19.13.0.0.211019 (33192694))
        No release update patches need to be installed
        The following interim patches will be applied:
          33561310 (OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310))
    
    Installing patches...
    Patch installation complete.  Total patches installed: 4
    
    Validating logfiles...done
    Patch 33192694 rollback (pdb CDB$ROOT): SUCCESS
      logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33192694/24421575/33192694_rollback_CDB2_CDBROOT_2022Jan19_22_14_08.log (no errors)
    Patch 33561310 apply (pdb CDB$ROOT): SUCCESS
      logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33561310/24538862/33561310_apply_CDB2_CDBROOT_2022Jan19_22_14_43.log (no errors)
    Patch 33192694 rollback (pdb PDB$SEED): SUCCESS
      logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33192694/24421575/33192694_rollback_CDB2_PDBSEED_2022Jan19_22_14_44.log (no errors)
    Patch 33561310 apply (pdb PDB$SEED): SUCCESS
      logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33561310/24538862/33561310_apply_CDB2_PDBSEED_2022Jan19_22_14_44.log (no errors)
    SQL Patching tool complete on Wed Jan 19 22:14:45 2022
    

    All set now.

Applying RU 12.2.0.1.220118 to my 12.2 home

Next step is patching my 12.2.0.1 environment. I won’t print out the entire output for 12.2.0.1 anymore.

  1. Conflict and space checks
    $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    
    $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -ph ./
    

    Let me just point out that patching my 12.2.0.1 environment does not have these minute-long hangs or waits as I see with 19c.

  2. opatch apply

    $ORACLE_HOME/OPatch/opatch apply

     

  3. datapatch

    $ORACLE_HOME/OPatch/datapatch -verbose

     

  4. Enabling optimizer fixes

    SQL*Plus: Release 12.2.0.1.0 Production on Wed Jan 19 22:26:22 2022
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> set serveroutput on
    SQL> execute dbms_optim_bundle.getBugsforBundle;
    
    12.2.0.1.210119DBRU:
        Bug: 32234161,  fix_controls: 32075777
    
    PL/SQL procedure successfully completed.
    
    SQL> execute dbms_optim_bundle.enable_optim_fixes('ON','BOTH', 'YES')
    DBMS_OPTIM command:  dbms_optim_bundle.enable_optim_fixes('ON', 'BOTH', 'YES')
    
    Bundle's _fix_control setting as per action:ON
    25476149:1  23249829:1	26019148:1  23643560:1	26986173:1  27466597:1
    20107874:1  27321179:1	25120742:1  26536320:1	26423085:1  28072567:1
    8932139:1  25405100:1  24745366:1  24926999:1  25643889:0  23738553:1
    28201419:1  25575369:1	22070473:1  24841671:1	24573561:1  27000158:1
    29450812:1  25926263:1	22174392:1  23738304:1	28835937:1  29687220:1
    25792706:1  29930457:1	28776431:1  28602253:1	31310771:0  32075777:0
    
    ...
    
    PL/SQL procedure successfully completed.
    

     

Applying PSU 11.2.0.4.220118 to my 11.2 home

Next step is patching my 19c environment.

  1. Conflict and space checks

    $ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    Oracle Interim Patch Installer version 11.2.0.3.32
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    PREREQ session
    
    Oracle Home       : /u01/app/oracle/product/11.2.0.4
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/11.2.0.4/oraInst.loc
    OPatch version    : 11.2.0.3.32
    OUI version       : 11.2.0.4.0
    Log file location : /u01/app/oracle/product/11.2.0.4/cfgtoollogs/opatch/opatch2022-01-19_22-36-22PM_1.log
    
    Invoking prereq "checkconflictagainstohwithdetail"
    
    Prereq "checkConflictAgainstOHWithDetail" passed.
    
    OPatch succeeded.
    

     

  2. opatch apply

    $ $ORACLE_HOME/OPatch/opatch apply
    Oracle Interim Patch Installer version 11.2.0.3.32
    Copyright (c) 2022, Oracle Corporation.  All rights reserved.
    
    
    Oracle Home       : /u01/app/oracle/product/11.2.0.4
    Central Inventory : /u01/app/oraInventory
       from           : /u01/app/oracle/product/11.2.0.4/oraInst.loc
    OPatch version    : 11.2.0.3.32
    OUI version       : 11.2.0.4.0
    Log file location : /u01/app/oracle/product/11.2.0.4/cfgtoollogs/opatch/opatch2022-01-19_22-36-36PM_1.log
    
    Verifying environment and performing prerequisite checks...
    OPatch continues with these patches:   31983472  32328626  32758711  33128584  33477185  
    
    Do you want to proceed? [y|n]
    y
    User Responded with: Y
    All checks passed.
    
    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
    (Oracle Home = '/u01/app/oracle/product/11.2.0.4')
    
    
    Is the local system ready for patching? [y|n]
    y
    User Responded with: Y
    Backing up files...
    Applying sub-patch '31983472' to OH '/u01/app/oracle/product/11.2.0.4'
    
    Patching component oracle.rdbms, 11.2.0.4.0...
    
    Patching component oracle.ctx, 11.2.0.4.0...
    Applying sub-patch '32328626' to OH '/u01/app/oracle/product/11.2.0.4'
    
    Patching component oracle.rdbms, 11.2.0.4.0...
    
    Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
    
    Patching component oracle.rdbms.rsf, 11.2.0.4.0...
    
    Patching component oracle.rdbms.dv, 11.2.0.4.0...
    
    Patching component oracle.rdbms.rman, 11.2.0.4.0...
    
    Patching component oracle.ldap.rsf, 11.2.0.4.0...
    
    Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...
    Applying sub-patch '32758711' to OH '/u01/app/oracle/product/11.2.0.4'
    
    Patching component oracle.rdbms, 11.2.0.4.0...
    
    Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
    
    Patching component oracle.ctx, 11.2.0.4.0...
    
    Patching component oracle.network.rsf, 11.2.0.4.0...
    Applying sub-patch '33128584' to OH '/u01/app/oracle/product/11.2.0.4'
    
    Patching component oracle.rdbms, 11.2.0.4.0...
    
    Patching component oracle.rdbms.rsf, 11.2.0.4.0...
    
    Patching component oracle.ctx, 11.2.0.4.0...
    Applying sub-patch '33477185' to OH '/u01/app/oracle/product/11.2.0.4'
    
    Patching component oracle.rdbms, 11.2.0.4.0...
    
    Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
    
    Patching component oracle.rdbms.rsf, 11.2.0.4.0...
    
    Patching component oracle.network.rsf, 11.2.0.4.0...
    
    Patching component oracle.rdbms.dv, 11.2.0.4.0...
    Composite patch 33477185 successfully applied.
    Log file location: /u01/app/oracle/product/11.2.0.4/cfgtoollogs/opatch/opatch2022-01-19_22-36-36PM_1.log
    
    OPatch succeeded.
    

     

  3. catbundle

    $ cd $ORACLE_HOME/rdbms/admin
    [FTEX] oracle@hol:/u01/app/oracle/product/11.2.0.4/rdbms/admin
    $ s
    
    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 19 22:39:52 2022
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    Connected to an idle instance.
    
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1152450560 bytes
    Fixed Size		    2252584 bytes
    Variable Size		  335544536 bytes
    Database Buffers	  805306368 bytes
    Redo Buffers		    9347072 bytes
    Database mounted.
    Database opened.
    SQL> @catbundle.sql psu apply
    

    But at this point I see a number of errors such as:

    CREATE OR REPLACE LIBRARY xdb.DBMS_XDB_LIB wrapped
    *
    ERROR at line 1:
    ORA-01435: user does not exist
    
    
    CREATE OR REPLACE FUNCTION xdb.get_xdb_tablespace wrapped
    *
    ERROR at line 1:
    ORA-01435: user does not exist
    
    
    SQL> grant execute on xdb.get_xdb_tablespace to public;
    grant execute on xdb.get_xdb_tablespace to public
                         *
    ERROR at line 1:
    ORA-04042: procedure, function, package, or package body does not exist
    
    
    
    SQL> grant execute on sys.check_upgrade to xdb;
    grant execute on sys.check_upgrade to xdb
                                          *
    ERROR at line 1:
    ORA-01917: user or role 'XDB' does not exist
    

    That’s expected since my database has no user schema XDB.

     

Your patch is not available?

In case you miss the patch bundle for your release and platform, please read this blog post.

Further Links and Information

–Mike

 

Share this: