Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Posts
    16

    Unanswered: trigger- how to prevent rollback?

    I have an AFTER UPDATE for each row trigger, which inserts into an audit_table.
    How to prevent rolback of triggering statement (UPDATE) when inserting in audit_table is not possible and cause an exception?

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    62
    You can't

  3. #3
    Join Date
    Aug 2003
    Posts
    16

    Unhappy

    Originally posted by Walter Janissen
    You can't
    But isn't there any solution to this problem?

  4. #4
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    62
    AFAIK: no, no chance with triggers. But in DB2 z/OS you can activate the audit traces and if you have the right tools, like DB2PM, you can analyse these information and see who selects, updates or what ever a special table.

  5. #5
    Join Date
    Aug 2003
    Posts
    16

    Red face

    Perhaps calling from trigger a stored procedure which inserts into audit_table will solve the problem?

    Sorry for asking silly questions, but I'm new to DB2 and I found that DB2 documentation is far more difficult to search and understand than Oracle. In Oracle this trigger situation can be avoided very easy.

    Thanks anyway for help!

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If you are on DB2 for distributed platforms, you cannot call a stored procedure from a trigger
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Aug 2003
    Posts
    16

    Unhappy

    I give up.
    It seems that preventing rollback of triggering statement
    isn't possible in DB2.

    Thanks to all.

Posting Permissions

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