Collections:
"DISABLE TRIGGER" - Disabling Triggers in SQL Server
How To Disable Triggers using "DISABLE TRIGGER" in SQL Server?
✍: FYIcenter.com
If want to stop the execution of an existing trigger temporarily, you can use the "DISABLE TRIGGER" statement to disable it. The disabled trigger will be kept in the database.
If you want to resume the execution of a disabled trigger, you can use the "ENABLE TRIGGER" statement to enable it.
The tutorial exercise below shows you how to disable and enable triggers:
USE FyiCenterData
GO
-- disabling a trigger
DISABLE TRIGGER dml_message ON fyi_users;
GO
INSERT INTO fyi_users (name) VALUES ('Jack Gate');
GO
(1 row(s) affected)
-- enabling a trigger
ENABLE TRIGGER dml_message ON fyi_users;
GO
INSERT INTO fyi_users (name) VALUES ('Roy Bush');
GO
Time: Jul 1 2007
Records are inserted, updated, or deleted in fyi_users
(1 row(s) affected)
⇒ Creating Triggers for INSERT Statements Only in SQL Server
⇐ sys.sql_modules - Getting Trigger Definitions Back in SQL Server
2016-10-24, 3066🔥, 0💬
Popular Posts:
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
How To Get a List of All Tables with "sys.tables" View in SQL Server? If you want to see the table y...
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL? If your transaction receives th...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...