January 30, 2008 at 3:20 pm
Comments posted to this topic are about the item Enable Disable All Triggers in a Database
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
March 20, 2008 at 6:57 am
Hi
I have this command that is more simple
EXECUTE sp_msforeachtable "ALTER TABLE ? disable trigger ALL"
Adrian
March 21, 2008 at 7:56 am
I have updated the initial query so that it will indicate the enabled/disabled triggers in a SQL Server 2005 database.
SELECT T.[name] as TableName,
TR.[Name] as TriggerName,
CASE WHEN 1=OBJECTPROPERTY(TR.[object_id], 'ExecIsTriggerDisabled')
THEN 'Disabled'
ELSE 'Enabled'
END Status
FROM sys.objects T
INNER JOIN sys.triggers TR
ON T.[object_id] = TR.parent_id
WHERE (T.type = 'U' or T.type = 'V')
ORDER BY T.[name], TR.[name];
January 18, 2011 at 9:46 am
May 12, 2016 at 6:36 am
Thanks for the script.
May 12, 2016 at 6:36 am
This turned out to be very handy for our conversion. Thanks again.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply