Technical Article

Get the current state of triggers.

,

One thing that many people may do is disable a trigger temporarily to make changes without the trigger causing an issue. This is a simple way to quickly get all the triggers states in a database, so you can verify is it enabled or disabled.

SELECT OBJECT_NAME(parent_obj) tablename, [name] triggername, (CASE WHEN (STATUS & 2048) = 2048 THEN 'Disabled' ELSE 'Enabled' END) state FROM sysobjects WHERE xtype = 'TR'

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating