I am using SQL server 7.0 and have some TRIGGERS set up against tables for INSERT, UPDATE and DELETE actions. I am able to turn these on and off. What syntax should I be using to determine if a TRIGGER is currently active or not ?
Thanks in advance
Steve
It appears that the status on sysobjects table is updated when a trigger is abled or disabled. The disabled value is 2048 more than the enabled value.
Perhaps you could do a query like this.
select status, name from sysobjects
where type ='tr'
and name='triggername'
If status > 2048 then the trigger is disabled otherwise it is enabled. I think this will work with all triggers but cannot find any documentation to prove it. Terry
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.