Trigger
The following figure shows a sample Information screen for a trigger.
Trigger Information Display Screen
COMMAND ===>
Specify 'S' to Select more information for Trigger: BFHUSER1.TRIGDEPT
S Trigger Text
_ Remarks/Comment On
Createdby : FDSQLID TBName : XXXXXXXXXXXXXXXX
Owner : FDSQLID TBOwner : XXXXXXX
Trigger Time : X DBID : XXXXXX
Trigger Event: X OBID : XXXXXX
Granularity : X
Createdts : 2001-08-20-13.15.00.556173
The following fields appear if you are displaying information for a trigger:
Trigger Text
Brings up a separate screen showing any text associated with the trigger. Use S to select.
Remarks/Comment On
Brings up a separate screen showing any remarks associated with the trigger. If no remarks exist, the message ‘No Remarks Exist’ appears in the upper right-hand corner of the screen.
Created By
Authid of the creator of the trigger.
Owner
Authid of the owner of the trigger.
TBName
Name of the table to which this trigger applies.
TBOwner
Qualifier of the name of the table to which this trigger applies.
Trigger Time
Time when triggered actions are applied to the base table, relative to the event that activated the trigger:
B | Trigger is applied before the event. |
A | Trigger is applied after the event. |
Trigger Event
Operation that activates the trigger:
I | Insert |
D | Delete |
U | Update |
Granularity
Trigger is executed once per:
S | Statement |
R | Row |
DBID
Identifier of the database in which the table resides.
OBID
Identifier of the table.
Createdts
Time when the CREATE statement was executed for this trigger. Multiple triggers appear in ascending order. Triggers of the same type are executed in the order they were created. A trigger cannot be altered, so a drop and recreate of a trigger can potentially change the order in which triggers are executed.
Trigger Text
The Trigger Text screen appears when you enter an S in the Trigger Text field on the Trigger Information screen.
Trigger Text Screen
COMMAND ===>
There were 1 SEQNO's
Text for Trigger: FADB2710.ADD_EMP
CREATE TRIGGER FADB2710.ADD_EMP
AFTER INSERT ON FADB2710.EMP
REFERENCING NEW AS NEWEMP
FOR EACH ROW
MODE DB2SQL
INSERT INTO FADB2710.ACT
VALUES (INTEGER(NEWEMP.EMPNO),
NEWEMP.EMPNO,
NEWEMP.LASTNAME)
*************************** Bottom of data ***************************
SEQNO
Sequence number of this row; the first portion of the trigger definition is in row 1, and successive rows have increasing SEQNO values. In this example, the text was across three rows in the SYSIBM.SYSTRIGGERS Db2 catalog table.
Comment On
The Comment On screen appears when you enter an S in the Remarks/Comment On field on the Trigger Information screen.
Comment On Screen
COMMAND ===>
Remarks for Trigger: BFHUSER1.TRIGDEPT
VALUE
USED BY THE QUALITY ASSURANCE GROUP TO CREATE AUDIT INFORMATION
ON THE DEPARTMENT