One of my issues with sp_who2 is that you need to be in the console to run it as it recalls spid twice and most reporting tools throw this as an error.My question is, would using the code below to reformat sp_who2 be a more reliable approach than taking the definition for sp_who and removing the --Handy extra for right-scrolling users.as it is described!Create Proc [Reports].[UspResults_sp_who2]AsBegin     Declare @Results Table        (            [SPID] Int        , [Status] Varchar(Max)        , [LOGIN] Varchar(Max)        , [HostName] Varchar(Max)        , [BlkBy] Varchar(Max)        , [DBName] Varchar(Max)        , [Command] Varchar(Max)        , [CPUTime] Int        , [DiskIO] Int        , [LastBatch] Varchar(Max)        , [ProgramName] Varchar(Max)        , [SPID_1] Int        , [REQUESTID] Int        );    Insert  Into @Results            ( [SPID]            , [Status]            , [LOGIN]            , [HostName]            , [BlkBy]            , [DBName]            , [Command]            , [CPUTime]            , [DiskIO]            , [LastBatch]            , [ProgramName]            , [SPID_1]            , [REQUESTID]            )            Exec [sys].[sp_who2];    --Only show SPID once, show blocked processes first, followed by CPU time and DISK IO hoggers    Select  [SPID]            , [Status]            , [LOGIN]            , [HostName]            , [BlkBy]            , [DBName]            , [Command]            , [CPUTime]            , [DiskIO]            , [LastBatch]            , [ProgramName]            , [REQUESTID]    From    @Results    Order By [BlkBy] Asc            , [CPUTime] Desc            , [DiskIO] Desc            , [SPID] Asc;End;
Reportable Sp_Who2
sql;sql server