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)
 Exception Handling In Stored Procedures

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-11 : 00:43:16
Mahesh writes "we have used isolation level serializable locking in a stored procedure which execute multiple insert, update and read statements with in a transaction batch. while this batch is in execution it throws an error that table is "Locked " if some other user executes the same procedure at the same time. we just want that other user should remain in a waiting queue till the procedure is in use by somebody else without displaying the error."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-03-11 : 08:49:53
Your lock timeout setting is probably the culprit. You can change it by adding SET LOCK_TIMEOUT to your stored procedure; this will set the maximum number of milliseconds it will wait for a locked resource to become available. Books Online has more information on it.

Go to Top of Page
   

- Advertisement -