ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Stop DB triggers from being invoked on a DB2/400 DB without disabling/removing them

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stop DB triggers from being invoked on a DB2/400 DB without disabling/removing them

    We have a production box and a HA box, never ending jobs (that process transactions) would be running in both boxes but only 1 box will be doing real work at a time.
    And data will be mimixed to the other box.

    We do not want our file triggers to fire on the HA box. We cannot ?DISABLE? the DB file triggers in HA, as that would need an exclusive lock on the files, but HA box jobs would be locking them.
    However, we can control the triggering actions within the trigger program with check on a master switch record or DTAARA.
    This would still be a call to the trigger program and evaluation of the DTAARA for every triggering update. This would cause unnecessary CPU usage and hence should be avoided ideally.

    Apart from disabling/removing the trigger and the control check within the trigger, is there a method that you are aware of, to avoid the trigger from getting invoked that would not need any file I/Os or ?C? spec code evaluation.
Working...
X