November 1, 2013 at 12:44 pm
Hi guys
Like to know what kind of default locking level in sql server is ?
Page ,table or row level?
anyway to check it ?
Thanks
--------------------------------------------------------------------------------
November 1, 2013 at 12:49 pm
Depends on how much data is going to be affected. It's not fixed. Couple of rows, row locks, fair portion of the table, probably page locks, most of the table, likely a table lock.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 1, 2013 at 12:53 pm
Take a look at this article.
http://technet.microsoft.com/en-us/library/ms189849.aspx
Then scroll down and read about lock escalation. That should answer your questions pretty well.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
November 4, 2013 at 5:00 am
assuming you havent disabled row or page locks on the index it would generally start with a row lock but as Gail said it depends on how much data is being processed
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
November 4, 2013 at 9:20 am
Everything is default configuration.. nothing is changed.. so my ext que is when page level locking is happens if it default row level locking?
November 4, 2013 at 10:01 am
Locking isn't by default at the row level. It depends how much data you're retrieving. SQL can choose to lock at the row level, page level or table level.
Did you read the referenced article?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 4, 2013 at 10:27 am
I read thatnk you Gail.. I got my answer.
Have a good Day
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply