find enabled/disabled triggers in an entire database at a time

Posted by Yrajudba under Sql Server on 9/13/2011 | Points: 10 | Views : 1301 | Status : [Member] | Replies : 2
Hi,

How to find enabled/disabled triggers in an entire database at a time.

please help me with t-sql statement

Thanks,
Raju




Responses

Posted by: Mcadeepuraj on: 9/13/2011 [Member] Starter | Points: 25

Up
0
Down
SELECT so1.name as TriggerName, CASE OBJECTPROPERTY(OBJECT_ID(so1.name),
'ExecIsTriggerDisabled') WHEN 0 THEN 'ENABLED' ELSE 'DISABLED' END AS Status,
so2.Name as TableName FROM SysObjects so1 JOIN SysObjects
so2 ON so2.Id = so1.Parent_obj WHERE so1.type = 'TR'

Deepak Kumar

Yrajudba, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Yrajudba on: 9/15/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks Deepu raj

Yrajudba, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response