Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002

    Unanswered: Triggers Atomicity property

    I created an INSERT TRIGGER that would perform some other process with the INSERTED data, affecting other tables in a different DB; when testing I noticed that if the process in the trigger fails the record that fired the trigger doesn't get inserted (Atomocity property I guess); is there a way I can bypass that? I want to insert the record no matter what, even if the process within the trigger fails.

    Any ideas?


  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    triggers are part of the transaction that call them. If this is does not fit your rules then it should not be part of a trigger.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jan 2003
    British Columbia
    I have never used this myself but can't they utilize the Save Transaction statement.

    Create a Save Transaction point at the beginning of the Trigger.
    Start a New Transaction.
    Modify the "different DB".
    On error Rollback the transaction to the save point.

    The outer transaction should still Commit as normal.

Posting Permissions

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