Rem
Rem $Header: javavm/install/jvmpsu.sql /st_javavm_19.0.0.0.0ojvmru/2 2022/08/25 13:02:11 sbusa Exp $
Rem
Rem jvmpsu.sql
Rem
Rem Copyright (c) 2013, 2022, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      jvmpsu.sql - JAVAVM Patch Set Update script
Rem
Rem    DESCRIPTION
Rem      Script to be run during post-install in a PSU.
Rem
Rem    NOTES
Rem      To be run as SYS
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    sbusa       08/23/22 - CI# 34473597 of sbusa_oct22_12.2.0.1_jdk8_2 from
Rem    sbusa       08/23/22 - st_javavm_12.2.0.1.0ojvmbp.
Rem    sbusa       08/23/22 - CI# 34473597
Rem    sbusa       08/23/22 - sbusa_ci_backport_34473578_19.17.0.0.221018ojvmru
Rem    nneeluru    12/19/17 - Disable JIT before RUJS
Rem    nneeluru    09/04/17 - Replace CJS, etc. with RUJS
Rem    nneeluru    10/02/14 - Remove is_valid check; refer bug 19699946 
Rem    nneeluru    08/16/13 - JAVAVM post-install script for PSU
Rem    nneeluru    08/16/13 - Created
Rem
Rem    BEGIN SQL_FILE_METADATA 
Rem    SQL_SOURCE_FILE: javavm/install/jvmpsu.sql 
Rem    SQL_SHIPPED_FILE: javavm/install/jvmpsu.sql 
Rem    SQL_PHASE: JVMPSU 
Rem    SQL_STARTUP_MODE: NORMAL 
Rem    SQL_IGNORABLE_ERRORS: NONE 
Rem    SQL_CALLING_FILE: catbundle.sql
Rem    END SQL_FILE_METADATA

SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100

variable jvmscript varchar2(50);
column :jvmscript new_value jvm_script noprint;

declare
  stat varchar2(30);
begin
  :jvmscript := '?/javavm/install/jvmempty.sql';
  select status into stat from dba_registry where comp_id = 'JAVAVM';
  if stat != 'REMOVED' then
    :jvmscript := 'jvmpsui.sql';
  end if;
exception when no_data_found then null;
end;
/

select :jvmscript from dual;

@@&jvm_script

