Home Forums SQL Server 2008 SQL Server 2008 - General Why is "instead of delete" trigger not fired by delete inside "after update" trigger RE: Why is "instead of delete" trigger not fired by delete inside "after update" trigger

  • Hi Brett,

    as I understand your case is about nested triggers.

    Check the article:

    http://msdn.microsoft.com/en-us//library/ms190739.aspx

    "Nested Triggers

    Triggers can be nested to a maximum of 32 levels. If a trigger changes a table on which there is another trigger, the second trigger is activated and can then call a third trigger, and so on. If any trigger in the chain sets off an infinite loop, the nesting level is exceeded and the trigger is canceled. To disable nested triggers, set the nested triggers option of sp_configure to 0 (off). "

    Nested triggers are configured on the server side:

    select * from sys.configurations where name like 'nested triggers'

    If this value is set to 0, that means that nested triggers are disabled.

    To turn it off you can use next script:

    sp_CONFIGURE 'nested_triggers',0

    GO

    RECONFIGURE

    GO