September 17, 2009 at 12:24 pm
HI all,
User claims that he is not able to update a record in a table and he gets this message as ' THe record is locked by other users. Try again' . I need to release this lock or kill the session that locked this table. On SSMS, activity monitor, I see Locks by Object, but doesnt tell me which session locked this table. I just see 7 sessions in this database.
Is there a way I can find out which session has locked this object?
Thanks
September 17, 2009 at 1:10 pm
That has to be an application message. SQL Server doesn't notify you of a lock. It just tries to wait until a timeout elapses, or the lock clears.
Applications sometimes raise a semaphore by making a mark on the record or in a table. If they see a mark for that row, they give the user a message.
September 17, 2009 at 1:16 pm
So, there is no lock in the SQL server?
Can you please tell me how can I find the locked table in the database? I tried sp_lock but it doesnt say which table is locked..
Thanks
September 17, 2009 at 1:26 pm
There probably is a lock. In SSMS, activity monitor, look at process info all the way to the right under "blocked by" and "blocking". Sort the "blocking" column and see if you get a spid, then right click "details" to see what it's running.
September 17, 2009 at 1:35 pm
We can't know if there's a lock. You can check for blocking, as noted above, but what application is it? I might suggest you contact the vendor for that application.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply