top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the meaning of lock escalation and why/how to stop this?

+3 votes
700 views
What is the meaning of lock escalation and why/how to stop this?
posted Mar 31, 2014 by Prachi Agarwal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

When the DB engine would try to lock page first and then it escalates locks to page and then table. If we
understand that whole table would be locked for the processing thenn this is better to use TABLOCK hint and get complete table blocked. This is a nice way to avoid the wastage of sql server DB engine processing for lock escalation. Somewhere you may also need to use TABLOCKX when you want an exclusive lock on the table in the query.

answer Mar 31, 2014 by Neeraj Pandey
...