August 11, 2006 at 2:02 am
Hi all,
One of our tables has got 3 trigger on it.
trigger 1,trigger 2,trigger 3
i want to set the trigger execution sequence as
trigger 1,trigger 3,trigger 2
Is there any I can set the firing sequence?
Thanks
V
August 11, 2006 at 2:22 am
Would you mind to open BOL?
Or you prefer somebody else to do it for you and copy-paste the topic here?
_____________
Code for TallyGenerator
August 11, 2006 at 4:05 am
well i am not looking for sp_settriggerorder. I have read an artical log back, don't remember where. I think the sp is called sp_triggersequence, but not sure....
August 11, 2006 at 4:18 am
Just open topic "Triggers" or "Create Trigger".
It's highlighted there.
_____________
Code for TallyGenerator
August 13, 2006 at 9:08 pm
I remember reading the same article (although I can't find it anymore)... it used a homegrown sp to "renumber" the ID's of the triggers so that they would fire in a certain order. Part of the reason I can't find the article is because I summarily dismissed it as being a really, really, bad idea.... way too much at risk and if someone add's or updates another trigger, the order can easily be destroyed which will really gum up the works.
If you want to guarantee the order between 3 triggers, use sp_settriggerorder as was implied. If you need to control the order of more than 3 triggers, you need to just learn to incorporate trigger code into single triggers in the correct order... I don't know why people think that a trigger should only test for one thing...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply