Rem
Rem $Header: javavm/install/bug35933540_rollback.sql /st_javavm_19.0.0.0.0ojvmru/1 2025/10/28 13:16:58 apfwkr Exp $
Rem
Rem bug35933540_rollback.sql
Rem
Rem Copyright (c) 2023, 2025, Oracle and/or its affiliates.
Rem
Rem    NAME
Rem      bug35933540_rollback.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem
Rem    BEGIN SQL_FILE_METADATA
Rem    SQL_SOURCE_FILE: javavm/install/bug35933540_rollback.sql
Rem    SQL_SHIPPED_FILE: javavm/install/bug35933540_rollback.sql
Rem    SQL_PHASE: PATCH
Rem    SQL_STARTUP_MODE: NORMAL
Rem    SQL_IGNORABLE_ERRORS: NONE
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    etucker     11/14/23 - Created
Rem

@@?/rdbms/admin/sqlsessstart.sql
declare
 stat varchar2(30);
begin
  
  select status into stat from dba_registry where comp_id = 'JAVAVM';
  if stat != 'REMOVED' then
    begin
      execute immediate 'revoke select on SYS.DBA_JAVA_CLASSES from SELECT_CATALOG_ROLE';
      execute immediate 'revoke select on SYS.CDB_JAVA_CLASSES from SELECT_CATALOG_ROLE';
      execute immediate 'grant read on SYS.DBA_JAVA_CLASSES to public with grant option';
      execute immediate 'grant read on SYS.CDB_JAVA_CLASSES to public with grant option';
    exception
    when others then
      if sqlcode not in (-1927) then raise; end if;
    end; 
  end if;
end;
/

@?/rdbms/admin/sqlsessend.sql
 
