• Bhuvnesh (11/19/2012)


    hi2u (11/19/2012)


    Does the trigger keep the initial (TABLOCK, XLOCK) or the lock is released and another one is made for the trigger?Thanks

    Yes to maintain the atomicity there will be seperate LOCK

    What do you mean "by separate LOCK"?

    Intial locks placed on a table for UPDATE will be there until transaction is committed. INSTEAD OF trigger fires before SQL performs any change (not even change logging), so the only thing I can see may happen is LOCK escalation to the higher level...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]