Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPP-4776] Ensure tablespace does not exist before trying to create it. #5767

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@

alter session set "_ORACLE_SCRIPT"=true;

declare tablespaceexists integer;
begin
select count(*) into tablespaceexists from dba_tablespaces where tablespace_name='PENTAHO_TABLESPACE';
if (tablespaceexists = 0) then
execute immediate 'create tablespace pentaho_tablespace logging datafile ''ptho_ts.dbf'' size 32m autoextend on next 32m maxsize 2048m extent management local';
end if;
end;
/

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 QUARTZ TABLES

CONN quartz/password
Expand Down