Quick Tip on Datapatch

Posted by

When I patch my databases through the various Release Updates, I normally do a blog post showing how easy and trouble-free the experience is. Some readers sometimes claim that this is because I’m just shilling for Oracle and that I’ll never show any problems I encounter

So to stake my claim of honesty, openness and fairness, I’ll share a small issue I had yesterday when patching my Windows systems from 19.15 to 19.16.

The opatch part of the update went through fine. Note that until 21c, on Windows you’ll probably still have the rollback your existing OJVM patch before you can apply the new one, but all of the binary patching went through without incident.

Then when I ran datapatch on my first few databases on this machine, they all worked fine. On my last database, which is a non-container database (although I’ve no idea if that is related to the problem or not), datapatch bombed out for me


C:\oracle\product\19\OPatch>datapatch -verbose
SQL Patching tool version 19.16.0.0.0 Production on Wed Oct  5 18:31:41 2022
Copyright (c) 2012, 2022, Oracle.  All rights reserved.

Log file for this invocation: C:\oracle\cfgtoollogs\sqlpatch\sqlpatch_29632_2022_10_05_18_31_41\sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done

[snip]

Error: prereq checks failed!
  patch 31219897: Error reading descriptor from registry: Couldn't open encmap windows-1253.enc:
No such file or directory
 at C:/oracle/product/19/perl/site/lib/XML/Parser.pm line 187.
XML::Simple called at C:\oracle\product\19\\sqlpatch/sqlpatch.pm line 8185.

[snip]

Prereq check failed, exiting without installing any patches.

A quick search on MOS lead me to the Doc ID 2645981.1 which suggests applying a small patch (a single file: sqlpatch\lib\XML\simplePM.pm) to the perl files that sit under Datapatch.  I did that and then Datapatch ran without any errors.

As always, for a “real” database in your data centre, whenever you hit a problem patching I always recommend you liaise with Oracle Support to determine the best course of action.

Happy Patching!

Got some thoughts? Leave a comment

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

WordPress.com Logo

You are commenting using your WordPress.com 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.