Related Posts on
“The OJVM Patching Saga – and how to solve it“:
- Part I – The OJVM Basics
- Part II – Important Notes and Information
- Part III – The Mitigation Patch
- Part IV – What you may have missed
- Part V – MOS Note explaining “Conditional Rolling Install”

What is missing with the “Mitigation Patch?
Michael, the team lead from a large Oracle customer mailed me the other day. He wanted to disable Java on all their +600 databases by using the Mitigation Patch for OJVM. But he received a strange error when trying to enable the mitigation patch which is clearly included in the April 2016 PSU he is using on his Oracle 12.1.0.2 databases:
SQL> exec dbms_java_dev.disable BEGIN dbms_java_dev.disable; END; * ERROR at line 1: ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_JAVA_DEV.DISABLE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
MOS didn’t reveal an immediate solution. And we’ve exchanged some emails detecting some issues with one-offs applied only on one cluster node. But actually that was not the root cause for the mitigation patch not allowing to disable java.
We did check if the SQL changes from the April 2016 PSU really had been applied with the script I published here:
But the results were ok – datapatch had been executed in the database:
SET LINESIZE 400
COLUMN action_time FORMAT A20
COLUMN action FORMAT A10
COLUMN status FORMAT A10
COLUMN description FORMAT A60
COLUMN version FORMAT A10
COLUMN bundle_series FORMAT A10
SELECT TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time,
action,
status,
description,
version,
patch_id,
bundle_series
FROM sys.dba_registry_sqlpatch
ORDER by action_time;
ACTION_TIME ACTION STATUS DESCRIPTION VERSION PATCH_ID BUN
-------------------- -------- ------- ------------------------------------------------------ -------- -------- ---
02-MAR-2016 08:59:35 APPLY SUCCESS Database Patch Set Update : 12.1.0.2.5 (21359755) 12.1.0.2 21359755 PSU
02-MAY-2016 09:44:45 APPLY SUCCESS Database Patch Set Update : 12.1.0.2.160419 (22291127) 12.1.0.2 22291127 PSU
13-MAY-2016 12:52:01 ROLLBACK SUCCESS Database Patch Set Update : 12.1.0.2.160419 (22291127) 12.1.0.2 22291127 PSU
17-MAY-2016 11:16:56 APPLY SUCCESS Database Patch Set Update : 12.1.0.2.160419 (22291127) 12.1.0.2 22291127 PSU
The Solution
Finally Michael found the solution.
This tiny little script didn’t get run: dbmsjdev.sql
It only gets mentioned in the PSU’s and BPs READMEs and easily can be overlooked.
Furthermore I couldn’t find it mentioned in any other MOS note.
- July 2016 – README PSU for Oracle Database 12.1.0.2 – Section 3.3.2. under 3.
https://updates.oracle.com/Orion/Services/download?type=readme&aru=20592212 - October 2016 – README PSU for Oracle Database 12.1.0.2 – Section 3.3.2 under 3.
https://updates.oracle.com/Orion/Services/download?type=readme&aru=20919988#CHDCBBFE - January 2017 – README BP for Oracle Database 12.1.0.2 – Section 2.6.2 under 4.
https://updates.oracle.com/Orion/Services/download?type=readme&aru=20803829#CIHEEDCG
And I missed it on my previous blog post as well and added it now.
Once you executed dbmsjdev.sql then you can disable Java by using:
SQL> exec dbms_java_dev.disable PL/SQL procedure successfully completed.
Further information
- MOS Note:1929745.1
Oracle Recommended Patches — “Oracle JavaVM Component Database PSU” (OJVM PSU) Patches
This MOS Note has a section about ISSUES as well.
–Mike
1 Response
[…] Part IV – What you may have missed […]