A DML trigger is a set of SQL statements which are executed when a DML (Insert/Update/Delete) event occurs in a database. A DDL trigger is set of SQL statements executed when a DDL event (Drop_Table/Alter_Table) occurs in a database. In this blog we’ll see how to disable or enable DML and DDL triggers.

To disable a DML trigger execute below query

To check triggers status execute below query

1_Disable and Enable triggers in SQL Server

The column value is_disabled = 1 as shown in above image indicates that trigger is disabled and is_disabled = 0 indicates that trigger is active.

To enable a DML trigger execute below query

To disable a DDL trigger execute below query

To enable DDL trigger execute below query

To check triggers status execute below query

2_Disable and Enable triggers in SQL Server

 

Regards

Ahmad Osama

Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook