Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
This article describes how to configure the nested triggers
server configuration option in SQL Server by using SQL Server Management Studio or Transact-SQL. The nested triggers
option controls whether an AFTER
trigger can cascade. That is, perform an action that initiates another trigger, which initiates another trigger, and so on. When nested triggers
is set to 0
, AFTER
triggers can't cascade. When nested triggers
is set to 1
(the default), AFTER
triggers can cascade to as many as 32 levels. INSTEAD OF
triggers can be nested regardless of the setting of this option.
Execute permissions on sp_configure
with no parameters or with only the first parameter are granted to all users by default. To execute sp_configure
with both parameters to change a configuration option or to run the RECONFIGURE
statement, a user must be granted the ALTER SETTINGS
server-level permission. The ALTER SETTINGS
permission is implicitly held by the sysadmin and serveradmin fixed server roles.
In Object Explorer, right-click a server, and then select Properties.
On the Advanced page, set the Allow Triggers to Fire Others option to True (the default) or False.
Connect to the Database Engine.
From the Standard bar, select New Query.
Copy and paste the following example into the query window and select Execute. This example shows how to use sp_configure to set the value of the nested triggers
option to 0
.
USE master;
GO
EXECUTE sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXECUTE sp_configure 'nested triggers', 0;
GO
RECONFIGURE;
GO
EXECUTE sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO
For more information, see Server configuration options.
The setting takes effect immediately without restarting the server.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Use events and triggers in Dynamics 365 Business Central - Training
Do you want to know how to access different table and page triggers? Do you also want to learn how to develop by using event-based architecture? If so, this module will explain how to use events and triggers in Microsoft Dynamics 365 Business Central.
Documentation
server trigger recursion (server configuration option) - SQL Server
Learn how the server trigger recursion option affects recursion in SQL Server server-level triggers. See how to turn direct and indirect recursion on and off.
sp_configure (Transact-SQL) - SQL Server
sp_configure displays or changes global configuration settings for the current server.
Resize the Job History Log - SQL Server Agent
Resize the Job History Log