Home » Blog » Topic » How to enable and disable trigger in SQL server

How to enable and disable trigger in SQL server

Lincoln Burrows ~ Modified: December 10th, 2015 ~ ~ 1 Minute Reading

Home Forums How to enable and disable trigger in SQL server

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #994 Score: 0
    Lincoln Burrows
    Moderator
    16 pts

    Is there any way to enable and disable SQL Server triggers?

    #1005 Score: 0
    Andrew Jackson
    Moderator
    1 pt

    To disable / enable selective triggers…

    ALTER TABLE tableName DISABLE TRIGGER triggername
    ALTER TABLE tableName ENABLE TRIGGER triggername
    

    To disable / enable all triggers…

    ALTER TABLE tableName DISABLE TRIGGER ALL
    ALTER TABLE tableName ENABLE TRIGGER ALL 
    
    #1007 Score: 0
    Lincoln Burrows
    Moderator
    16 pts

    Thanks Andrew for the script, it works great, but I also want to know can I enable and disable SQL Server Trigger using SQL Server Management Studio (GUI).

    #1008 Score: 0
    Stephen West
    Moderator
    4 pts

    I have found an informative article that shows how to enable and disable indexes in SQL Server using SQL Server Management Studio and Transact-SQL hope this will help you out, see from here: http://www.sqlserverlogexplorer.com/enable-and-disable-indexes/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.