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'
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: