HomeDatabaseSQL Server 2005: How to Disable a Trigger

SQL Server 2005: How to Disable a Trigger

A trigger allows for the execution of SQL code anytime an UPDATE, INSERT, or DELETE command is performed on a certain table. If you are having to perform manual modifications to the table, you may not want the trigger to fire off. Here’s how to disable the trigger so that you can perform your administrative tasks:


To disable the trigger, open a query window and use the following command (inserting the proper Table Name and Trigger Name into the statement):
ALTER TABLE <Table Name> DISABLE TRIGGER <Trigger Name>

To enable the trigger, use the following command (inserting the proper Table Name and Trigger Name into the statement):
ALTER TABLE <Table Name> ENABLE TRIGGER <Trigger Name>

Rob Rogers
Rob Rogers
Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
RELATED ARTICLES

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments

Cleveland Furia on How to Clear Google Activity
Sid Wohlfarth on How to Clear Google Activity
Riley Magsayo on How to Clear Google Activity
สมัครรับเครดิตฟรี ทันที on How to improve Remote Desktop Protocol Performance
Neal Wangstad on How to Clear Google Activity
Slavcho Andov on How to install Ubuntu
Slavcho Andov on How to fix bad sectors
Sheraz Ali on How to Backup Android