---查找锁住的表已经相关的进程
select object_name(resource_associated_entity_id) as tableName, request_session_id as pid from sys.dm_tran_locks
where resource_type = 'OBJECT' and object_name(resource_associated_entity_id) ='T_Purchase_Detail'
---查看锁住的进程执行的语句
DBCC INPUTBUFFER (402)