How we can see which Trigger is Enabled or Disabled in SQL Server 2008?
To view database level triggers, Login to the server using SQL Server management studio and navigate to the database. Expand the database and navigate to Programmability -> Database Triggers. To view triggers at the server level, Login to Server using SSMS and navigate to Server Objects and then Triggers folder.
You can use the is_disabled column in sys. triggers table to filter the records according to your requirement.
To enable a trigger, causes it to fire when any Transact-SQL statements on which it was originally programmed are run. Triggers are disabled by using DISABLE TRIGGER. DML triggers defined on tables can also be disabled or enabled by using ALTER TABLE.
Using sys.triggers
SELECT name, is_disabled FROM sys.triggers
In big databases you usually don't know the table for the trigger.
SELECT OBJECT_NAME(parent_id) [table_name],[name] [trigger_name],is_disabled
FROM sys.triggers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With