diff --git a/ansible/group_vars/server_type_ncr_db.yml b/ansible/group_vars/server_type_ncr_db.yml index d18454471..bbe87f19e 100644 --- a/ansible/group_vars/server_type_ncr_db.yml +++ b/ansible/group_vars/server_type_ncr_db.yml @@ -83,11 +83,21 @@ grid_home: /u01/app/oracle/product/19c/gridhome_1 tns_entries: t1: + - name: T1BISYS + port: 1521 + host_list: + - t1-ncr-db-1-a.nomis-combined-reporting.hmpps-test.modernisation-platform.internal + service_name: T1BISYS - name: T1BIPSYS port: 1521 host_list: - t1-ncr-db-1-a.nomis-combined-reporting.hmpps-test.modernisation-platform.internal service_name: T1BIPSYS + - name: T1BIAUD + port: 1521 + host_list: + - t1-ncr-db-1-a.nomis-combined-reporting.hmpps-test.modernisation-platform.internal + service_name: T1BIAUD - name: T1BIPAUD port: 1521 host_list: diff --git a/ansible/roles/ncr-db/templates/setup_T1BIAUD.sql.j2 b/ansible/roles/ncr-db/templates/setup_T1BIAUD.sql.j2 new file mode 100644 index 000000000..06b207296 --- /dev/null +++ b/ansible/roles/ncr-db/templates/setup_T1BIAUD.sql.j2 @@ -0,0 +1,21 @@ +set echo on +spool {{ stage }}/setup_bipaud.log + +create tablespace MISAUD_TS; + +create profile nart +limit PASSWORD_REUSE_TIME unlimited +PASSWORD_LIFE_TIME unlimited; + +create user BIP_AUDIT_OWNER identified by "{{ bip_audit_owner_password }}" +default tablespace MISAUD_TS +profile NART; +grant CONNECT, CREATE JOB, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TABLE, CREATE TRIGGER, UNLIMITED TABLESPACE to BIP_AUDIT_OWNER; + +create user BODS_IPS_AUDIT_OWNER identified by "{{ bods_ips_audit_password }}" +default tablespace MISAUD_TS +profile NART; +grant CONNECT, CREATE JOB, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TABLE, UNLIMITED TABLESPACE to BODS_IPS_AUDIT_OWNER; + +spool off +exit; diff --git a/ansible/roles/ncr-db/templates/setup_T1BISYS.sql.j2 b/ansible/roles/ncr-db/templates/setup_T1BISYS.sql.j2 new file mode 100644 index 000000000..4f5b0af0a --- /dev/null +++ b/ansible/roles/ncr-db/templates/setup_T1BISYS.sql.j2 @@ -0,0 +1,27 @@ +set echo on +spool {{ stage }}/setup_bipaud.log + +create tablespace MISSYS_TS; +create tablespace BODIREP_TS; + +create profile nart +limit PASSWORD_REUSE_TIME unlimited +PASSWORD_LIFE_TIME unlimited; + +create user BIP_SYSTEM_OWNER identified by "{{ bip_system_owner_password }}" +default tablespace MISSYS_TS +profile NART; +grant CONNECT, CREATE PROCEDURE, CREATE TABLE, UNLIMITED TABLESPACE to BIP_SYSTEM_OWNER; + +create user BODS_IPS_SYSTEM_OWNER identified by "{{ bods_ips_system_owner_password }}" +default tablespace MISSYS_TS +profile NART; +grant CONNECT, CREATE PROCEDURE, CREATE TABLE, UNLIMITED TABLESPACE to BODS_IPS_SYSTEM_OWNER; + +create user BODS_REPO_OWNER identified by "{{ bods_repo_owner_password }}" +default tablespace BODIREP_TS +profile NART; +grant CONNECT, CREATE SEQUENCE, CREATE TABLE, CREATE VIEW, UNLIMITED TABLESPACE to BODS_REPO_OWNER; + +spool off +exit;