Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


SQL Server 2005 Trigger Rollback issue

- - - - -

  • Please log in to reply
1 reply to this topic


  • Member
  • 1 posts
  • Joined 22-October 07
While browsing the MSDN library about the behaviour of triggers with rollback transaction commands i found the following:

german msdn documentation july 2006 - link:

Beim Ausgeben von ROLLBACK TRANSACTION in einem Trigger erfolgt Folgendes:

Der Trigger setzt die Ausführung aller verbleibenden Anweisungen nach der ROLLBACK-Anweisung fort. Wenn durch eine dieser Anweisungen Daten geändert werden, wird für die Änderungen kein Rollback ausgeführt. Es werden keine geschachtelten Trigger durch die Ausführung der verbleibenden Anweisungen ausgelöst.

which means that nested triggers will not be executed after a rollback command within the trigger.

when trying the following example:

alter trigger tins on a after insert as   raiserror('tins!', 16, 1)   rollback transaction   update a set x = 0goalter trigger tupd on a after update as   raiserror('tupd!', 16, 1)goinsert into a values(3,4)

the output is the following:

Meldung 50000, Ebene 16, Status 1, Prozedur tins, Zeile 2tins!Meldung 50000, Ebene 16, Status 1, Prozedur tupd, Zeile 2tupd!

which isnt really what we expected.

Bug ? or Documenation Bug ?

How to remove advertisement from MSFN



    Cyber Ops

  • Super Moderator
  • 3,568 posts
  • Joined 24-September 05
  • OS:none specified
  • Country: Country Flag


Your odds of getting assistance increase if you translate the German to English for us.

Good luck :)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users