SQL Server是否已锁定表?

时间:2010-11-26 18:40:58

标签: sql-server

我正在使用SQL Server 2000(使用SQL 8.02)。是否有查询表明表是否已锁定?

1 个答案:

答案 0 :(得分:0)

select
db_name(resource_database_id) AS DBName,
object_name(resource_associated_entity_id, resource_database_id) AS Object,
request_session_id AS SPID,  request_mode AS RMode, request_type AS RType,
request_status AS RStatus
from sys.dm_tran_locks
where resource_type = 'object'