The OJVM Patching Saga – and how to solve it – Part IV

Related Posts on
The OJVM Patching Saga – and how to solve it“:

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:

DBA_REGISTRY_HISTORY vs DBA_REGISTRY_SQLPATCH

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.

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

–Mike

One thought on “The OJVM Patching Saga – and how to solve it – Part IV

  1. Pingback: The OJVM Patching Saga – and how to solve it – Part II | Upgrade your Database - NOW!

Leave a Reply

Your email address will not be published. Required fields are marked *