A few weeks ago I did blog about the DBUA (Database Upgrade Assistant) not executing ‘datapatch’ (i.e. not applying the SQL changes involved with a SPU/PSU/BP) automatically:
For DBUA, please note that this behavior DOES NOT APPLY to command line upgrades done with catctl.pl – as you can see from this somewhat disturbing messages during the upgrade in phase 65 and phase 69 (which are not errors but just informational messages for datapatch’s execution):
But afterwards I have learned that things are worse.
The same behavior is true when you create a database.
Not a typo.
You create a fresh database with DBCA (Database Configuration Assistant), you are a honest customer, you have followed our advice and applied the most recent PSU (or SPU or BP) into your Oracle Home. You don’t even deploy one of the preconfigured databases but use the CREATE CUSTOM DATABASE option of DBCA. And the database will run from the patched home – but the SQL changes haven’t been applied to it.
DBCA does not call ‘datapatch’ for database changes.
I consider this even worse than the DBUA behavior as the person who upgrades a database in most cases is aware of the future home. But the person who either deploys a new database or asks for one to be deployed is often not identical with the person who did patch the homes.
And there’s no warning displayed yet nor (afaik) is there a MOS note available talking about it.
How do you fix the issue?
After creating a new database make sure to run:
cd $ORACLE_HOME/OPatch ./datapatch -verbose
and double check with DBA_REGISTRY_SQLPATCH view:
select PATCH_ID, PATCH_UID, VERSION, STATUS, DESCRIPTION from DBA_REGISTRY_SQLPATCH order by BUNDLE_SERIES;
Actually to be 100% you may find some patch information in DBA_REGISTRY_SQLPATCH showing that the JAVAVM patch has been applied in case you’ve installed the Combo version of the PSU. But you’ll miss the database changes.
This misbehavior applies to all databases in Oracle Database 126.96.36.199, regardless of which PSU or BP you are using as unless for the DBUA the issue has not been fixed. Please be aware!
Related Blog Posts datapatch.pl:
- No OS authentication? Then datapatch.pl will fail (Sep 29, 2015)
- DBCA 12c and “datapatch.pl” – things to know (Aug 17, 2015)
- DBUA 12c and “datapatch.pl” – things to know (Jul 20, 2015)
Oracle Database 188.8.131.52
Addition – Sept 18, 2015:
Please be aware that the same thing happens on ODA (Oracle Database Appliance) with the oakcli. This will be fixed in the version 184.108.40.206 (ODA/oakcli)