From 35b987fc5e16af541bd9fc0d3bebbba51cd3029b Mon Sep 17 00:00:00 2001 From: Peter Rinehart Date: Wed, 30 Oct 2024 11:14:56 -0400 Subject: [PATCH] [PPP-4776] Do not drop quartz user if it exists, but create it if it does not. --- .../data/oracle/create_quartz_ora.sql | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/assemblies/pentaho-data/src/main/resources/data/oracle/create_quartz_ora.sql b/assemblies/pentaho-data/src/main/resources/data/oracle/create_quartz_ora.sql index 2dcd6835e69..387b8fcdd34 100644 --- a/assemblies/pentaho-data/src/main/resources/data/oracle/create_quartz_ora.sql +++ b/assemblies/pentaho-data/src/main/resources/data/oracle/create_quartz_ora.sql @@ -9,19 +9,17 @@ alter session set "_ORACLE_SCRIPT"=true; -drop user quartz cascade; +declare userexist integer; +begin + select count(*) into userexist from dba_users where username='QUARTZ'; + if (userexist = 0) then + execute immediate 'create tablespace pentaho_tablespace logging datafile ''ptho_ts.dbf'' size 32m autoextend on next 32m maxsize 2048m extent management local'; + execute immediate 'create user quartz identified by "password" default tablespace pentaho_tablespace quota unlimited on pentaho_tablespace temporary tablespace temp quota 5M on system'; + execute immediate 'grant create session, create procedure, create table to quartz'; + end if; +end; +/ -create tablespace pentaho_tablespace - logging - datafile 'ptho_ts.dbf' - size 32m - autoextend on - next 32m maxsize 2048m - extent management local; - -create user quartz identified by "password" default tablespace pentaho_tablespace quota unlimited on pentaho_tablespace temporary tablespace temp quota 5M on system; - -grant create session, create procedure, create table to quartz; --CREATE QUARTZ TABLES