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
 General SQL Server Forums
 New to SQL Server Programming
 lock request time out exceed replication

Author  Topic 

pnpsql
Posting Yak Master

246 Posts

Posted - 2012-10-19 : 02:37:44
hi team,


i want two queries that leads to lock requesttime out issue. please help

challenge everything

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2012-10-19 : 03:26:12
Try this

You run two statements using different sessions...


1) Run this in 1st session
BEGIN TRAN
UPDATE yourTable SET column = SomeValue
WAITFOR DELAY '000:20:00' -- means wait 20 mins for committing this transaction ( This will lock Your Table. you may extend waiting time to get TimeOut message)
COMMIT TRAN

2) Run this in 2nd session

SELECT * FROM YourTable






--
Chandu
Go to Top of Page
   

- Advertisement -