Forum Stats

  • 3,855,433 Users
  • 2,264,502 Discussions


DBUA and the preupgrade utility need to check JAVA_DEV_ALLOWED from sys.java_dev_status

user10070103 Member Posts: 1 Blue Ribbon
edited Jan 11, 2016 6:06PM in Database Ideas - Ideas

I just had an aborted 12c upgrade because the new java development was disabled, previously, by the installation of the Oct  2014 java mitigation patch (not the Oct 2014 CPU). I had run the preupgrade.sql (after getting the latest using Oracle document 884522.1 ).

Neither it, nor DBUA, bothers to run this query and stop me before I start an upgrade:

     select JAVA_DEV_ALLOWED  from sys.java_dev_status;

If the result is 'NO', you better stop then, exit DBUA, and enable java development and bounce the database. I didn't know this and I had to recover my database and redo the upgrade after enabling new development.

Its a small change, but will save hours of time if your upgrade abort in the middle because of this.  I now added this to my upgrade document:

--- check to see if java development is disabled by the mitigation
patch; if so,

--- enable it


  sql_stmt varchar2(4000);

  h_JAVA_DEV_ALLOWED varchar2(500);


  select JAVA_DEV_ALLOWED into h_JAVA_DEV_ALLOWED from sys.java_dev_status;

    dbms_Output.put_line('JAVA_DEV_ALLOWED ='||h_JAVA_DEV_ALLOWED);

   if trim(upper(h_JAVA_DEV_ALLOWED)) = 'NO' then

  sql_stmt := 'begin sys.dbms_java_dev.enable; end;';


    execute immediate sql_stmt;

    dbms_Output.put_line('***** now bounce the database ***** ');


     dbms_Output.put_line('its enabled, no action needed ');

   end if;



  select JAVA_DEV_ALLOWED   fromsys.java_dev_status;

Antonio NavarroborneselUser259623 -Oraclevinaykumar2Manish ChaturvediArpit Jain -OraclePravin TakpireLothar FlatzJagadekara991901
11 votes

Active · Last Updated