Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rajkumarrai_bis
Yak Posting Veteran
78 Posts |
Posted - 2007-04-19 : 20:39:46
|
I m using sql server 2005i have got one request ,to apply page level locking on databasecan nyone how it is donei can do that for a single script and for session(transaction isolation level)but dont know about database level locking schemethanks in advance |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-04-19 : 23:06:34
|
first of all, if you are using 2005, you should post in a 2005 forum. second, sql server will use page level locking on it's own when the optimizer decides it's appropriate. are you saying you want to force page level locks instead of row or table level locks? usually it's better to let the engine make such decisions. but if you must, first read and understand this page, in particular the PAGLOCK hint: http://msdn2.microsoft.com/en-us/library/ms187373.aspxEDIT: forgot to mention a related topic, which is lock escalation: http://msdn2.microsoft.com/en-us/library/ms184286.aspx www.elsasoft.org |
 |
|
rajkumarrai_bis
Yak Posting Veteran
78 Posts |
Posted - 2007-04-20 : 18:53:43
|
thanks jezemine,but i guess i was not clear last time.links that you i have provided,i know that stuffI can control locking on scripts by locking hintsand I can control session locking behaviour by transaction isolation level but i dont know how to apply locking mode on database can you specify thatthanks in advance |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-04-20 : 19:14:50
|
do you mean you want to be able to specify "for all objects in this database, always use page level locks"?i don't think that's possible. and if it is possible, i wouldn't recommend it. www.elsasoft.org |
 |
|
|
|
|