Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Triggers attchemnt to a table

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2010-08-26 : 03:37:25
Hi All,

How to find how many triggers are enabled on particular table through query ?

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-08-26 : 04:23:46
select * from sys.triggers where is_disabled = 0 and Parent_id = object_id(<yourtablename>)

Ex:
select * from sys.triggers where is_disabled = 0 and Parent_id = object_id('tblsource')
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2010-08-26 : 04:24:23
[code]
select * from sys.triggers where parent_id = OBJECT_ID('<yourtable>')
[/code]
Go to Top of Page
   

- Advertisement -