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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 how to apply page level locking on database

Author  Topic 

rajkumarrai_bis
Yak Posting Veteran

78 Posts

Posted - 2007-04-19 : 20:39:46
I m using sql server 2005
i have got one request ,to apply page level locking on database
can nyone how it is done
i can do that for a single script and for session(transaction isolation level)
but dont know about database level locking scheme

thanks 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.aspx

EDIT: forgot to mention a related topic, which is lock escalation: http://msdn2.microsoft.com/en-us/library/ms184286.aspx


www.elsasoft.org
Go to Top of Page

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 stuff
I can control locking on scripts by locking hints
and I can control session locking behaviour by transaction isolation level
but i dont know how to apply locking mode on database can you specify that

thanks in advance
Go to Top of Page

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
Go to Top of Page
   

- Advertisement -