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 Development (2000)
 SQL Database/Table Locking Methods

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-10-22 : 23:18:27
Sharon writes "I would like some information on the locking methods of a SQL database or tables. I have found that when you do an update or delete that by default the locking method is table locking. This is a method that is not working for us. We receive a lot of deadlocks and this is not acceptable. When we put the "with (rowlock)" or "with (updlock)" directly on the SQL statements we still are hitting with deadlocks. We had a suggestion to put the SQL statement in a small loop to retry. This did work to an extent on our development system, but that is small compared to what we want to do in production. This seems like a lame work around. Isn't there a way to set the locking at a table or even database level. I have created some of our databases and tables but is there something I am missing when creating them? I don't want to have to specify exact locking on every SQL call we do and then put the stuff in a loop.

There has to be a better way to do this and I was looking for some answers.

Thanx,
Sharon
"

   

- Advertisement -