Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    25

    Unanswered: Disabling triggers in a stored procedure

    I want to disable all the triggers on a table in a stored procedure using
    the SQL stm

    ALTER TABLE tab1 DISABLE TRIGGER ALL

    However this does'nt seem to work on DB2. Is there any solution or
    workaround to this?

    How does DB2 handle enabling & disabling of triggers?

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Disabling triggers in a stored procedure

    AFAIK, DB2 does not have an option to disable triggers.

    One possible workaround is to include some conditions in the trigger statement to enable/disable it ... For example, if the user
    USER1's connections should not trigger, then run the trigger body only if the user is not 'USER1' [ WHEN (User <> 'USER1' or 'DBADM' ) ]. Checking many other conditions might be possible.

    HTH

    Cheers

    Sathyaram


    Originally posted by vdesai
    I want to disable all the triggers on a table in a stored procedure using
    the SQL stm

    ALTER TABLE tab1 DISABLE TRIGGER ALL

    However this does'nt seem to work on DB2. Is there any solution or
    workaround to this?

    How does DB2 handle enabling & disabling of triggers?

Posting Permissions

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