Friday, March 9, 2012

REQ: Help needed with extracting SP_WHO data

I need to be able to break down sp_who and pull the count of the BLK
column when it's greater than 0.
any assistance is appreciated."BobMarley" <brianh*REMOVEFOREMAIL*@.conterra.com> wrote in message
news:17l9tvg0c7vkiid1g17oatrd1ch0vio0c5@.4ax.com...
> I need to be able to break down sp_who and pull the count of the BLK
> column when it's greater than 0.
> any assistance is appreciated.
>
CREATE TABLE #sp_who (
spid smallint NOT NULL ,
ecid smallint NOT NULL ,
status nchar (30) NOT NULL ,
loginame nchar (128) NOT NULL ,
hostname nchar (128) NOT NULL ,
blk char(5),
dbname nvarchar(128),
cmd nchar (16) NOT NULL)
insert into #sp_who exec sp_who
select * from #sp_who
where blk > 0
drop table #sp_who
--David|||select * from master..sysprocesses where blk > 0?
see
http://www.nigelrivett.net/sp_nrSpidByStatus.html
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

No comments:

Post a Comment