--THIS USER IS SPECIFIC TO THE DATABASE WHERE THIS SCRIPT IS TO BE RUN AND IT
--SHOULD BE A USER WITH DBA PRIVS.
--AND ALSO @pentaho should be replaced with the correct instance name

--conn admin/password@pentaho

set escape on;

create tablespace pentaho_tablespace
  logging
  datafile 'ptho_ts.dbf'
  size 32m
  autoextend on
  next 32m maxsize 2048m
  extent management local;

alter session set "_ORACLE_SCRIPT"=true;

drop user jcr_user cascade;



grant create session, create procedure, create table, create trigger, create sequence to jcr_user;

--CREATE ADDITIONAL REPOSITORY TABLES

conn jcr_user/password;
commit;