sqlserver查看表是否锁住

---查询
select
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type='OBJECT '
---解锁
kill spid

posted @ 2021-10-25 19:16  小芝麻开花  阅读(182)  评论(0编辑  收藏  举报