MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/javavm/install/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/javavm/install/jvmursc.sql

Rem    BEGIN SQL_FILE_METADATA
Rem    SQL_SOURCE_FILE: javavm/install/jvmursc.sql
Rem    SQL_SHIPPED_FILE: javavm/install/jvmursc.sql
Rem    SQL_PHASE: DOWNGRADE
Rem    SQL_STARTUP_MODE: UPGRADE
Rem    SQL_IGNORABLE_ERRORS: NONE
Rem    END SQL_FILE_METADATA

-- subscript for jvmunnn to do a subset of initjvm as part of upgrade

/*
#######################################################################
#######################################################################
##  The following statement may cause an
##  ORA-29554: unhandled Java out of memory condition
##  error.
##  If so, this is because there is insufficient system tablespace,
##  shared or java pool size, or some other resource value is too small.
##  An additional message describing the problem will be output by
##  the statement.
#######################################################################
#######################################################################
*/

declare
 trash number;
begin
 select 1 into trash from java$jvm$status where action != 'DOWNGRADERELOAD';
 initjvmaux.check_sizes_for_cjs;
exception when no_data_found then null;
end;
/

-- Load all the Java classes
begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
  initjvmaux.rollbacksetup;
  commit;
  initjvmaux.rollbackset;
  initjvmaux.exec('create or replace java system');
  commit;
  initjvmaux.rollbackcleanup;
  initjvmaux.endstep;
  dbms_registry.update_schema_list('JAVAVM',
        dbms_registry.schema_list_t('OJVMSYS'));
end if; end;
/


-- Java Sanity check for installation
-- Define package dbms_java
@@initjvm2

-- Java Sanity Check

-- Verify that a simple java stored procedure works
select dbms_java.longname('foo') from dual;

-- Check for any Java classes that are invalid.
-- The following query should return 0 rows.
delete from java$rmjvm$aux3;
insert into java$rmjvm$aux3 (select joxftobn from x$joxfc where bitand(joxftflags,96)!=0);
select nvl(longdbcs,name) from obj$ o,javasnm$,java$rmjvm$aux3 a where
  status != 1 and owner#=0 and name=short(+) and o.obj#=a.obj#(+) and
  (type#=56 or (type#=29 and a.obj# is not null));

-- Find all the error messages.
-- Create the get error package for LoadJava
@@initjvm4

-- Triggers to run startup and shutdown Java code
-- The configuration data for currently registered MTS listener endpoints
-- SQLJ initialization
-- XA JSP initialization
@@initjvm5

-- the following 3 blocks replace 'grant select's with 'grant read's.
-- prior to 12.1: "grant select ...". Starting from 12.2: grant read
begin
  execute immediate 'revoke select on USER_JAVA_POLICY from PUBLIC';
exception when others
  then null;
end;
/

begin
  execute immediate 'revoke select on javasnm from PUBLIC';
exception when others
  then null;
end;
/

begin
  execute immediate 'grant read on USER_JAVA_POLICY to PUBLIC with grant option';
  execute immediate 'grant read on javasnm to public';
exception when others
  then null;
end;
/


OHA YOOOO