SQL SERVER – 2005 – Disable Triggers – Drop Triggers

There are two ways to prevent trigger from firing.

1) Drop Trigger
Example:
DROP TRIGGER TriggerName
GO

2) Disable Trigger
DML trigger can be disabled two ways. Using ALETER TABLE statement or use DISABLE TRIGGER. I prefer DISABLE TRIGGER statement.
Syntax:
DISABLE TRIGGER { [ schema . ] trigger_name
[ ,...n ]
| ALL }
ON { OBJECT_NAME | DATABASE | ALL SERVER } [ ; ]

Example:
DISABLE TRIGGER TriggerName ON TableName

Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Scripts, SQL Server Security, SQL Trigger
Previous Post
SQL SERVER – Fix : Error 1702 CREATE TABLE failed because column in table exceeds the maximum of columns
Next Post
SQL SERVER – Script to Find SQL Server on Network

Related Posts

Leave a Reply