直接查询语句了:
select a.spid, locktype=convert(char(12),name), dbname=convert(char(15),db_name(a.dbid)), tablename=convert(char(55),object_name(a.id,a.dbid)), page, class=convert(char(15),class), hostname, cmd from master..syslocks a,master..spt_values b,master..sysprocesses c where a.type = b.number and b.type = 'L' and a.spid = c.spid order by spid
可以查出锁的类型,哪个表被锁了等等信息。