webMethods OneData 10.11 | Managing Master Data with webMethods OneData | Implementing webMethods OneData | Managing an Object Structure | webMethods OneData Audit Columns and Triggers | webMethods OneData Audit Triggers
 
webMethods OneData Audit Triggers
Every data object in webMethods OneData must have audit triggers associated with their tables. For tables, webMethods OneData automatically adds these audit triggers when the object is imported into webMethods OneData. For views, the base table must already have audit triggers.
The script for audit triggers is as follows:
*Trigger on the audit column LST_UPD_DT in the Work schema:
CREATE OR REPLACE TRIGGER TRIGGER_NAME BEFORE UPDATE OR INSERT
ON TABLE_NAME FOR EACH ROW BEGIN :new.LST_UPD_DT := SYSDATE ; END;
*Trigger on the audit column S2P_TRN_DT in the Release schema:
CREATE OR REPLACE TRIGGER TRIGGER_NAME BEFORE UPDATE OR INSERT
ON TABLE_NAME FOR EACH ROW BEGIN :new.S2P_TRN_DT := SYSDATE ; END;