SQL Server: check whether a Trigger is Enabled or Disabled?

Sql ServerSql Server-2008TsqlTriggers

Sql Server Problem Overview


How we can see which Trigger is Enabled or Disabled in SQL Server 2008?

Sql Server Solutions


Solution 1 - Sql Server

Using sys.triggers

SELECT name, is_disabled FROM sys.triggers

Solution 2 - Sql Server

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 

Solution 3 - Sql Server

Descriptive State of Trigger help you to clearly ready about status. Also excluding triggers not related with user tables.

Check the below code:

SELECT OBJECT_NAME(parent_id) [Table_Name],[name] [Trigger_Name],
Case When is_disabled=0 then 'Enabled' Else 'Disabled' End [Trigger_Status], is_disabled
FROM sys.triggers 
where OBJECT_NAME(parent_id) is not null 

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVikrant MoreView Question on Stackoverflow
Solution 1 - Sql ServergbnView Answer on Stackoverflow
Solution 2 - Sql ServerIgor MicevView Answer on Stackoverflow
Solution 3 - Sql Serverikram.chathaView Answer on Stackoverflow