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 |
|
raclede
Posting Yak Master
180 Posts |
Posted - 2005-05-27 : 00:55:44
|
SET LOCK_TIMEOUT 18000does it prevents deadlock?. let say I have a stored procedure with SET LOCK_TIMEOUT on the beginning, when deadlock occurred does the SP wait until the lock is release then continue executing again?"If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside. " raclede™ |
|
|
SreenivasBora
Posting Yak Master
164 Posts |
Posted - 2005-05-27 : 09:48:54
|
| Lets take this example:Open Query Analyzer 1:---------------------begin transaction update employee set job_Id =13 where job_Id = 13Execute the QueryOpen Query Analyzer 2:---------------------Create procedure PEmp as Begin SET LOCK_TIMEOUT 18000 select * from employeeendExecute :exec pEmpIf the First transaction is not COMMITTED / ROLLBACKED with in the 18000 milliseconds it will give the error likeServer: Msg 1222, Level 16, State 50, Procedure PEmp, Line 4Lock request time out period exceeded.Other wise it will work. It is just like simple suspension of execution of query for some milliseconds (18000) once other transaction is on LOCK.:-) any queries please feel free .....With RegardsSreenivas Reddy B |
 |
|
|
|
|
|