Monday, August 16, 2010

Triggers in SQL Server

Regardless of whether you use "For Insert" or "After Insert", the trigger runs synchronously. Thus when your trigger gets bogged down, you will not get the data inserted.

M$ assume your triggers work in an instant action way. It does not expect delays. Thus, It waits faitfully till your trigger terminates. This has an impact as the record inserted is locked till the trigger ends. If you try to list the record when it hangs, it will take forever without coming back to you.

No comments:

Post a Comment