--Change the path of JAVA_SERVICE1_USER_DB.dat if required
CREATE TABLESPACE "JAVA_SERVICE1_USER_DB"
 DATAFILE 'JAVA_SERVICE1_USER_DB.dat' SIZE 1M 

CREATE USER JAVA_SERVICE1_USER IDENTIFIED BY JAVA_SERVICE1_USER
DEFAULT TABLESPACE JAVA_SERVICE1_USER_DB
QUOTA UNLIMITED ON JAVA_SERVICE1_USER_DB
TEMPORARY TABLESPACE temp
QUOTA 0M ON system;

GRANT CREATE session to JAVA_SERVICE1_USER;
GRANT CREATE table to JAVA_SERVICE1_USER;
GRANT CREATE procedure to JAVA_SERVICE1_USER;

grant select on sys.dba_pending_transactions to JAVA_SERVICE1_USER;
grant select on sys.pending_trans$ to JAVA_SERVICE1_USER;
grant select on sys.dba_2pc_pending to JAVA_SERVICE1_USER;
grant execute on sys.dbms_system to JAVA_SERVICE1_USER;
grant select on SYS.dba_2pc_neighbors to JAVA_SERVICE1_USER;
grant force any transaction to JAVA_SERVICE1_USER;

CREATE TABLE JAVA_SERVICE1_USER.JAVA_SERVICE1 (LAST_UPDATE_TIME VARCHAR(128), COUNTER VARCHAR(128), TEXT VARCHAR(1024))



--DROP USER JAVA_SERVICE1_USER;
--DROP TABLESPACE JAVA_SERVICE1_USER_DB INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;