Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007

    Unanswered: Question on DB2 Trigger

    I would like to use a DB2 Trigger to launch a CICS transaction when a row is inserted into a table. However, if multiple rows are inserted, I don't want to launch it multiple times because once it is launched, it can detect and process all those multiple rows. Can DB2 Triggers work like MQ Triggers works, where you can set up to only do one trigger process as long as the queue still has messages (i.e only launch trigger on first insert if there are multiple)?

    If not, I know I could set up the trigger to put a simple message to an internal queue, which in turn, is set up to trigger a process (transaction) that will be started on FIRST ONLY. (but I want to avoid if DB2 Trigger can do this).

    I've done some reading on this, and I can't find enough detail to give me an answer either way.

  2. #2
    Join Date
    Aug 2003
    You can define triggers to fire FOR EACH ROW or FOR EACH STATEMENT. FOR EACH STATEMENT is only valid for a BEFORE or INSTEAD OF trigger however.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts