Last active
June 2, 2017 17:01
-
-
Save nkundu/f8ca6424c780b5eba3109ea54928ef4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table #tmpSpWho2 ( | |
SPID bigint | |
, [Status] nvarchar(100) | |
, [Login] nvarchar(100) | |
, HostName nvarchar(100) | |
, BlkBy nvarchar(100) | |
, DBName nvarchar(100) | |
, Command nvarchar(100) | |
, CPUTime bigint | |
, DiskIO bigint | |
, LastBatch nvarchar(50) | |
, ProgramName nvarchar(100) | |
, SPID2 bigint | |
, REQUESTID int) | |
insert into #tmpSpWho2 | |
exec sp_who2 | |
select * from #tmpSpWho2 where ... | |
drop table #tmpSpWho2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment