September 4, 2002 at 10:06 am
Gurus,
I have three after insert,update triggers defined on a table and I want to order the execution of these triggers. Is there a way to do this. sp_settrigorder is of no use because each trigger is defined for insert and update. From my research I could only see that the order of creation of the triggers determine the order of execution but I don't want to take this path as this is not a perfect one. Any ideas or i will have to put everything into one single trigger and order by code accordingly.
Thanks.
September 4, 2002 at 10:11 am
Single trigger is your best bet.
Andy
September 4, 2002 at 10:33 am
Go with single triggers. When I was testing for an article I wrote, it showed that Microsoft's words of "you can't depend on order except first and last" are 100% on the mark. I wrote a bit more about firing order, including with respect to Cascading Referential Integrity here:
http://www.sqlservercentral.com/columnists/bkelley/triggerswhatsnew.asp
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1
K. Brian Kelley
@kbriankelley
September 4, 2002 at 11:51 am
Thanks Andy and Brian. I will go with one trigger.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply