Agent Jobs

Get Quick List Of Table Triggers

Here’s some quick sql logic to show you a list of all the triggers in a particular table. I’m using the msdb..sysjobhistory table as an example.

select
'table_name'	= stable.name
,	'trigger_name'	= strig.name
from
sys.triggers strig join sys.tables stable on strig.parent_id = stable.object_id where
stable.name = 'sysjobhistory'
order by
stable.name, strig.name asc
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s