Hi Friends,
This store procedure is used to Enable- Dsiable all triggers in a Database.
And to Show the triggers status use this query.
SELECT T.[name] as TableName, TR.[Name] as TriggerName,
CASE WHEN 1=OBJECTPROPERTY(TR.[id], 'ExecIsTriggerDisabled')THEN 'Disabled' ELSE 'Enabled' END Status
FROM sysobjects T INNER JOIN sysobjects TR on t.[ID] = TR.parent_obj WHERE (T.xtype = 'U' or T.XType = 'V')
AND (TR.xtype = 'TR') ORDER BY T.[name], TR.[name]
I hope this will help you. Leave your valuable comments.
Thanks for reading.
Vinay K