Locking tables | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Locking tables

what is the best command to find out who lock a specific table?

sp_LOCK
GO
SP_WHO
GO
SP_WHO2
GO
You can combine them.
I got it, but how do I know the table is locked ??
Hi,
when u run sp_lock it returns objid which is the object id requesting lock and then run below query select * from sysobjects where id=objid
Regard Hemantgiri S. Goswami
[email protected]
"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemantgiri Goswami

http://www.sql-server-performance.com/at_sql_locking.asp
http://www.sql-server-performance.com/reducing_locks_hints.asp
http://www.awprofessional.com/articles/article.asp?p=26890
Fyi. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>