Patching just keeps getting easier

Posted by

After attending a talk by Mike Dietrich at the DOAG conference, I was pleasantly surprised to hear that in 21c, there was no longer a need to patch the OJVM as a separate activity. But of course, being a natural cynic, I wanted to put Mike’s statements to the test.

And yes indeed – patching 21c was a piece of cake

1. Unzip the patch

D:\oracle\stage>unzip "U:\software\"
Archive:  U:/software/
   creating: 34110698/
   creating: 34110698/files/
   creating: 34110698/files/md/
   creating: 34110698/files/md/admin/
  inflating: 34110698/files/md/admin/sdoutlh.sql
  inflating: 34110698/files/md/admin/sdoseminfh.sql
  inflating: 34110698/files/md/admin/sdordfxb.plb
   creating: 34110698/etc/
   creating: 34110698/etc/config/
  inflating: 34110698/etc/config/inventory.xml
  inflating: 34110698/etc/config/actions.xml
  inflating: PatchSearch.xml

2. Add Opatch the path and check for conflicts

Microsoft Windows [Version 10.0.19043.2006]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd \oracle\product\21\OPatch

C:\oracle\product\21\OPatch>set PATH=C:\oracle\product\21\OPatch;%PATH%

C:\oracle\product\21\OPatch>cd /d D:\oracle\stage\34110698

D:\oracle\stage\34110698>opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : C:\oracle\product\21
Central Inventory : C:\Program Files\Oracle\Inventory
   from           :
OPatch version    :
OUI version       :
Log file location : C:\oracle\product\21\cfgtoollogs\opatch\opatch2022-09-27_13-54-15PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

3. Stop all services and then run “opatch apply”

D:\oracle\stage\34110698>opatch apply
Oracle Interim Patch Installer version
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

Oracle Home       : C:\oracle\product\21
Central Inventory : C:\Program Files\Oracle\Inventory
   from           :
OPatch version    :
OUI version       :
Log file location : C:\oracle\product\21\cfgtoollogs\opatch\opatch2022-09-27_13-54-27PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   34110698

Do you want to proceed? [y|n]
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'C:\oracle\product\21')

Is the local system ready for patching? [y|n]
User Responded with: Y
Backing up files...
Applying interim patch '34110698' to OH 'C:\oracle\product\21'
ApplySession: Optional component(s) [ oracle.sdo.companion, ] , [ oracle.sqlj, ] , [ oracle.rdbms.ic, ] , [, ] , [ oracle.rdbms.tg4sybs, ] , [ oracle.swd.oui.core.min, ] , [ oracle.usm, ] , [ oracle.has.cfs, ] , [ oracle.rdbms.tg4msql, ] , [, ] , [ oracle.rdbms.tg4ifmx, ] , [ oracle.has.cvu, ] , [ oracle.rdbms.tg4db2, ] , [ oracle.rdbms.tg4tera, ] , [ oracle.ons.daemon, ] , [ oracle.has.deconfig, ] , [, ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.ldap.owm,

Patching component oracle.sdo,

Patching component oracle.rdbms.rsf.ic,

Patching component oracle.ovm,

Patching component oracle.aspnet_2,

Patching component oracle.rdbms.lbac,

Patching component oracle.oracore.rsf,

Patching component oracle.ntoledb.odp_net_2,

Patching component oracle.rdbms.dbscripts,

Patching component oracle.precomp.lang,

Patching component oracle.rdbms.deconfig,

Patching component oracle.javavm.server,

Patching component oracle.rdbms.dv,

Patching component,

Patching component oracle.has.common.cvu,

Patching component oracle.dbdev,

Patching component oracle.dbjava.ic,

Patching component oracle.has.db,

Patching component,

Patching component oracle.odbc.ic,

Patching component oracle.rdbms.scheduler,

Patching component oracle.assistants.deconfig,

Patching component oracle.jdk,

Patching component oracle.sdo.locator,

Patching component oracle.rsf,

Patching component oracle.clrintg.ode_net_2,

Patching component oracle.precomp.common,

Patching component oracle.xdk.rsf,

Patching component oracle.oraolap,

Patching component oracle.has.rsf,

Patching component oracle.ldap.rsf,

Patching component oracle.ctx,

Patching component oracle.rdbms.util,

Patching component oracle.ntoledb,

Patching component oracle.install.deinstalltool,

Patching component oracle.ons,

Patching component oracle.rdbms.rman,

Patching component oracle.rdbms.plsql,

Patching component oracle.sqlplus,

Patching component oracle.ntoramts,

Patching component oracle.xdk,

Patching component oracle.assistants.acf,

Patching component oracle.sqlplus.ic,

Patching component oracle.rdbms.olap,

Patching component oracle.blaslapack,

Patching component oracle.dbjava.ucp,

Patching component oracle.has.common,

Patching component,

Patching component oracle.ntoledbolap,

Patching component oracle.assistants.server,

Patching component oracle.nlsrtl.rsf,

Patching component oracle.usm.deconfig,

Patching component oracle.sdo.locator.jrf,

Patching component oracle.dbjava.jdbc,

Patching component oracle.xdk.xquery,

Patching component oracle.rdbms.rsf,

Patching component oracle.rdbms.install.plugins,

Patching component oracle.ons.ic,

Patching component oracle.rdbms,

Patching component oracle.ctx.atg,
Patch 34110698 successfully applied.
Log file location: C:\oracle\product\21\cfgtoollogs\opatch\opatch2022-09-27_13-54-27PM_1.log

OPatch succeeded.

4. Start the database, open all of my pluggables and run “datapatch”

D:\oracle\stage\34110698>cd /d C:\oracle\product\21\OPatch

C:\oracle\product\21\OPatch>sqlplus / as sysdba

SQL*Plus: Release - Production on Tue Sep 27 13:56:55 2022

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

Last Successful login time: Mon Sep 26 2022 18:32:51 +08:00

Connected to:
Oracle Database 21c Enterprise Edition Release - Production

SQL> alter pluggable database all open ;

Pluggable database altered.

SQL> exit
Disconnected from Oracle Database 21c Enterprise Edition Release - Production
C:\oracle\product\21\OPatch>datapatch -verbose
SQL Patching tool version Production on Tue Sep 27 13:57:14 2022
Copyright (c) 2012, 2022, Oracle.  All rights reserved.

Log file for this invocation: C:\oracle\homes\OraDB21Home1\cfgtoollogs\sqlpatch\sqlpatch_42332_2022_09_27_13_57_14\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: Release_Update 220719033723: Installed
    No release update patches installed
    No release update patches installed
    No release update patches installed

Adding patches to installation queue and performing prereq checks...done
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED PDB21A
    No interim patches need to be rolled back
    Patch 34110698 (Windows Database Bundle Patch : (34110698)):
      Apply from Feature Release to Release_Update 220719033723
    No interim patches need to be applied

Installing patches...
Patch installation complete.  Total patches installed: 3

Validating logfiles...done
Patch 34110698 apply (pdb CDB$ROOT): SUCCESS
  logfile: C:\oracle\homes\OraDB21Home1\cfgtoollogs\sqlpatch\34110698\24797022/34110698_apply_DB21_CDBROOT_2022Sep27_13_57_48.log (no errors)
Patch 34110698 apply (pdb PDB$SEED): SUCCESS
  logfile: C:\oracle\homes\OraDB21Home1\cfgtoollogs\sqlpatch\34110698\24797022/34110698_apply_DB21_PDBSEED_2022Sep27_14_00_35.log (no errors)
Patch 34110698 apply (pdb PDB21A): SUCCESS
  logfile: C:\oracle\homes\OraDB21Home1\cfgtoollogs\sqlpatch\34110698\24797022/34110698_apply_DB21_PDB21A_2022Sep27_14_00_35.log (no errors)
SQL Patching tool complete on Tue Sep 27 14:02:15 2022

So now the patch is applied, but the big test is – what patch revision is the OJVM now at?

SQL*Plus: Release - Production on Tue Sep 27 14:11:31 2022

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

Last Successful login time: Tue Sep 27 2022 13:56:56 +08:00

Connected to:
Oracle Database 21c Enterprise Edition Release - Production

SQL> select comp_name, version_full
  2  from dba_registry;

COMP_NAME                                                    VERSION_FULL
------------------------------------------------------------ ------------------------------
Oracle Database Catalog Views                      
Oracle Database Packages and Types                 
Oracle Real Application Clusters                   
JServer JAVA Virtual Machine                       
Oracle XDK                                         
Oracle Database Java Packages                      
OLAP Analytic Workspace                            
Oracle XML Database                                
Oracle Workspace Manager                           
Oracle Text                                        
Oracle Multimedia                                  
Oracle OLAP API                                    
Oracle Locator                                     
Oracle Label Security                              
Oracle Database Vault                              

16 rows selected.

Easy as that, my 21c is now fully patched. Thanks Mike!

Got some thoughts? Leave a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.