Category: Triggers

SQL Server Triggers articles and Trigger code examples

Re-Enable All Triggers in SQL Server

Hello to everyone, In this article, I will try to give information about how to reactivate all Triggers in SQL Server. In SQL Server you may want to re-enable all Triggers in some cases. You can easily do this using the code below. EXEC sp_MSforeachtable ‘ALTER TABLE ? ENABLE TRIGGER...

Trigger Preventing Table Creation in SQL Server

Hello everyone, In this article, I will provide information about creating triggers that prevent table creation in SQL Server. In SQL Server, in some cases, we may not want a table to be created in the current database. You can easily do this using the code below. CREATE TRIGGER StopTableCreation...

Listing Active Triggers in SQL Server

Hello everyone, In this section, I will talk about how to list active triggers in SQL Server. In SQL Server, in some cases, it may be necessary to list active triggers for the database. Using the code below, you can list your active triggers for your database. SELECT TAB.name AS...

Enable All Triggers in SQL Server

Hello to everyone, In this article, I will give information about how to enable All Triggers in SQL Server. In SQL Server, in some cases, you may want to enable all triggers. You can do this easily with the help of the code below. –Enable All Triggers in SQL Server...

Disable All Triggers in SQL Server

Hello to everyone, In this article, I will give information about how to disable All Triggers in SQL Server. In SQL Server, in some cases, you may want to disable all triggers. You can do this easily with the help of the code below. –Disable All Triggers in SQL Server...

Don`t copy text!