This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,795 Users
  • 2,269,776 Discussions
  • 7,916,827 Comments

Discussions

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

user10070103
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

declare

  sql_stmt varchar2(4000);

  h_JAVA_DEV_ALLOWED varchar2(500);

  begin

  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;';

    dbms_Output.put_line(sql_stmt);

    execute immediate sql_stmt;

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

   else

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

   end if;

  end;

  /

  select JAVA_DEV_ALLOWED   fromsys.java_dev_status;



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

Active · Last Updated

Comments