-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgzrerap.sql
56 lines (54 loc) · 1.97 KB
/
gzrerap.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--
-- Create Table
-- gzrerap.sql
--
-- AUDIT TRAIL: 8.9.3
-- 1. Create new table GZRERAP. ENB 11/15/2017
-- Created to store application names for which error logging is enabled.
-- This will allow for applications in GZRERRL not in this table to be an
-- implicit list of "unhandled" exception applications.
-- Applications should be added to this table once they've got a scheduled
-- report delivering the logs to an application admin.
--
-- AUDIT TRAIL: 8.9.4
-- 1. Migrated to Primary Key. ENB 1/3/18
-- Converted main index to being a unique primary key for the table.
--
-- AUDIT TRAIL END
--
DROP TABLE GZRERAP;
CREATE TABLE GZRERAP
(
GZRERAP_APPLICATION VARCHAR2(50) NOT NULL,
GZRERAP_DESC VARCHAR2(255) NOT NULL,
GZRERAP_ACTIVITY_DATE DATE DEFAULT SYSDATE NOT NULL
/* Will be added by DBEU calls further down the script */
-- GZRERAP_SURROGATE_ID NUMBER(19),
-- GZRERAP_VERSION NUMBER(19),
-- GZRERAP_USER_ID VARCHAR2(30),
-- GZRERAP_DATA_ORIGIN VARCHAR2(30),
-- GZRERAP_VPDI_CODE VARCHAR2(6)
);
--
ALTER TABLE GZRERAP ADD CONSTRAINT GZRERAP_PK PRIMARY KEY (GZRERAP_APPLICATION);
--
COMMENT ON TABLE GZRERAP IS
'Logged applications table for Albion processes.';
COMMENT ON COLUMN GZRERAP.GZRERAP_APPLICATION IS
'Application is a key field for the error log associated with top-level processes.';
COMMENT ON COLUMN GZRERAP.GZRERAP_DESC IS
'High-level description of each application and its role.';
--
GRANT SELECT, INSERT, UPDATE, DELETE ON GZRERAP TO USR_INFOSERV;
GRANT SELECT, INSERT, UPDATE, DELETE ON GZRERAP TO ALBINST;
BEGIN
dbeu_owner.dbeu_util.teardown_table(gb_common.f_sct_user(), 'GZRERAP');
dbeu_owner.dbeu_util.process_table(gb_common.f_sct_user(), 'GZRERAP');
dbeu_owner.dbeu_util.apply_table(gb_common.f_sct_user(), 'GZRERAP');
dbeu_owner.dbeu_util.extend_table(gb_common.f_sct_user(), 'GZRERAP', 'G', FALSE);
END;
/
WHENEVER SQLERROR CONTINUE;
DROP PUBLIC SYNONYM GZRERAP;
WHENEVER SQLERROR EXIT ROLLBACK;
CREATE PUBLIC SYNONYM GZRERAP FOR GZRERAP;