declare @TB table
(
spid varchar(100),
ecid varchar(100),
status varchar(100),
loginame varchar(100),
hostname varchar(100),
blk varchar(100),
dbname varchar(100),
cmd varchar(100),
request_id varchar(100)
)
insert into @TB exec sp_who
select * from @TB where status='suspended'
insert into #t1 select * from @TB where status='suspended'
有时候没有记录返回,但突然再过一秒可能就有十多个同时出现.不知道是什么原因造成.
想办法找出数据库访问的瓶颈.