select sysT.name as [Table Name], sysO.name as [Trigger Name], sysM.definition as [Trigger Script] from sys.tables sysT
inner join sys.objects sysO on sysT.object_id = sysO.parent_object_id
inner join sys.sql_modules sysM on sysO.object_id = sysM.object_id
where sysO.type ='TR'
No words wasted! Getting to the point about the work I do, the problems I deal with, and some links to posts about where I work.
Translate
Monday, January 13, 2014
SQL - List All Triggers In A Database
I needed to get a list of all of the triggers in a database. This is the script that I used:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thank you for commenting!