Trigger to audit DML and DDL not working
DBA: We had 3 solutions: 1. AUDIT_TRAIL
2. FGA
3. Customized TRIGGER to track the DML and DDL.
After discussion, option 3 has been implemented. Here is the code.
DML Trigger
=======
CREATE OR REPLACE TRIGGER SLCPROD.STORE_TERM_ID_HST_TRG
BEFORE INSERT OR UPDATE OR DELETE
ON SLCPROD.STORE_TERM_ID FOR EACH ROW
BEGINIF INSERTING THEN
INSERT INTO STORE_TERM_ID_HIST
( STR_NUM,
TERM_ID,
HOST_ENV,
USR_TERMINAL,