SQL Server Performance

Trigers Enable or Disble

Discussion in 'SQL Server 2005 General Developer Questions' started by dineshasanka, Mar 6, 2007.

  1. dineshasanka Moderator

    Is there any way of getting the list of triggers WITH THE status of it (Enable or Disable)
    I checked ofr sys.obejcts and sp_helptriggers but couldn't find it.

    ----------------------------------------
    Contributing Editor, Writer & Forums Moderator
    http://www.SQL-Server-Performance.Com

    Visit my Blog at
    http://dineshasanka.spaces.live.com/
  2. dineshasanka Moderator

    got it
    status = CASE WHEN OBJECTPROPERTY (id, 'ExecIsTriggerDisabled') = 0
    THEN 'Enabled' ELSE 'Disabled' END,


    ----------------------------------------
    Contributing Editor, Writer & Forums Moderator
    http://www.SQL-Server-Performance.Com

    Visit my Blog at
    http://dineshasanka.spaces.live.com/
  3. madhuottapalam New Member

    you can query Sys.Triggers table also

    select *from sys.triggers where is_disabled=1 --list the triggers disabled

    Madhu
  4. dineshasanka Moderator

    that will be more easy. thanks

    ----------------------------------------
    Contributing Editor, Writer & Forums Moderator
    http://www.SQL-Server-Performance.Com

    Visit my Blog at
    http://dineshasanka.spaces.live.com/

Share This Page