Skip to content

Commit

Permalink
Standard oppsett 21XE
Browse files Browse the repository at this point in the history
  • Loading branch information
jolarsen committed Aug 2, 2024
1 parent 4a15db1 commit 5e99c7c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 56 deletions.
13 changes: 0 additions & 13 deletions .oracle/oracle-init/00_initdb.sql

This file was deleted.

58 changes: 16 additions & 42 deletions .oracle/oracle-init/01_fplos.sql → .oracle/oracle-init/fplos.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,11 @@ BEGIN
WHERE USERNAME = 'FPLOS';
IF (userexists = 0)
THEN
EXECUTE IMMEDIATE ('CREATE USER FPLOS IDENTIFIED BY fplos PROFILE DEFAULT ACCOUNT UNLOCK');
EXECUTE IMMEDIATE ('CREATE USER FPLOS IDENTIFIED BY fplos PROFILE DEFAULT ACCOUNT UNLOCK QUOTA UNLIMITED ON SYSTEM');
END IF;
END;
/

DECLARE
userexists INTEGER;
BEGIN
SELECT count(*)
INTO userexists
FROM SYS.ALL_USERS
WHERE USERNAME = 'FPLOS_UNIT';
IF (userexists = 0)
THEN
EXECUTE IMMEDIATE ('CREATE USER FPLOS_UNIT IDENTIFIED BY fplos_unit PROFILE DEFAULT ACCOUNT UNLOCK');
END IF;
END;
/

DECLARE
userexists INTEGER;
BEGIN
SELECT count(*)
INTO userexists
FROM SYS.ALL_USERS
WHERE USERNAME = 'VL_DBA';
IF (userexists = 0)
THEN
EXECUTE IMMEDIATE ('CREATE USER VL_DBA IDENTIFIED BY vl_dba PROFILE DEFAULT ACCOUNT UNLOCK');
END IF;
END;
/

-- 1 Role for vl_dba
GRANT DBA TO VL_DBA;
ALTER USER VL_DBA DEFAULT ROLE ALL;

-- 2 System Privileges for vl_dba
GRANT CREATE SESSION TO VL_DBA;
GRANT UNLIMITED TABLESPACE TO VL_DBA;

GRANT
CREATE SESSION,
ALTER SESSION,
Expand All @@ -61,7 +25,21 @@ GRANT
CREATE SEQUENCE,
UNLIMITED TABLESPACE,
SELECT ANY TABLE
TO FPLOS;
TO FPLOS;

DECLARE
userexists INTEGER;
BEGIN
SELECT count(*)
INTO userexists
FROM SYS.ALL_USERS
WHERE USERNAME = 'FPLOS_UNIT';
IF (userexists = 0)
THEN
EXECUTE IMMEDIATE ('CREATE USER FPLOS_UNIT IDENTIFIED BY fplos_unit PROFILE DEFAULT ACCOUNT UNLOCK QUOTA UNLIMITED ON SYSTEM');
END IF;
END;
/

GRANT
CREATE SESSION,
Expand All @@ -77,7 +55,3 @@ GRANT
UNLIMITED TABLESPACE,
SELECT ANY TABLE
TO FPLOS_UNIT;

ALTER USER FPLOS QUOTA UNLIMITED ON SYSTEM;
ALTER USER FPLOS_UNIT QUOTA UNLIMITED ON SYSTEM;

2 changes: 1 addition & 1 deletion src/test/resources/application-vtp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ axsys.enabled=false
# Database
defaultDS.username=fplos
defaultDS.password=fplos
defaultDS.url=jdbc:oracle:thin:@localhost:1521:XE
defaultDS.url=jdbc:oracle:thin:@//localhost:1521/XE

0 comments on commit 5e99c7c

Please sign in to comment.