Does SQL Server 2005 use row level locking or page level locking as a default? I’m getting some timeout errors on some of my UPDATEs and wonder if it’s related to the default locking mechanism.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SQL Server always uses
row-levellocking by defaultIf you lock more than a certain amount of rows (5000), then
SQL Serverwill do lock escalation (lock the table instead of more than 5000 rows individually) to optimize performance and optimize on resource usageMy suggestion is to keep your transaction as short as possible..Or you can use with(NoLock) for those tables that are not being used for consecutive insertion by multiple users like Master Tables…
My another suggestion is to use SQL Profiler.