原创  检查SQLServer 锁情况 收藏

--检查SQLServer 锁情况
create table #test(
  spid 
smallint
  dbid 
smallint,
  ObjId 
int ,
  IndId 
smallint ,
  type 
nchar(4) ,
  Resource 
nchar(16),
  Mode 
nvarchar(8) ,
  Status 
nvarchar(8)
)

insert into #test exec sp_lock

   
select b.name, a.*
  
from #test a, sysobjects b
  
where a.objid=b.id  and b.type='U'

drop table #test

发表于 @ 2007年08月21日 14:17:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:SQLServer 查看所有表占用的空间 | 新一篇:避免浏览器内存泄露

  • 发表评论
  • 评论内容:
  •  
Copyright © TinyJimmy
Powered by CSDN Blog