December 2013
Intermediate to advanced
1872 pages
153h 31m
English
Recursive triggers were introduced in SQL Server 7.0. If a trigger modifies the same table where the trigger was created, the trigger does not fire again unless the recursive triggers option is turned on. recursive triggers is a database option turned off by default.
The first command in the following example checks the setting of recursive triggers for the AdventureWorks2012 database, and the second sets recursive triggers to TRUE:
select DATABASEPROPERTYEX ('AdventureWorks2012', 'IsRecursiveTriggersEnabled')ALTER DATABASE AdventureWorks2012 SET RECURSIVE_TRIGGERS ON
If you turn off nested triggers, recursive triggers are automatically disabled, regardless of how the database option is ...