SQL Server 2005 Trigger Rollback issue

2 posts in this topic

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 = 0

alter trigger tupd on a after update as
raiserror('tupd!', 16, 1)

insert into a values(3,4)

the output is the following:

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

which isnt really what we expected.

Bug ? or Documenation Bug ?


Share this post

Link to post
Share on other sites

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

Good luck :)


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.