Join resultset from SP_WhoIsActive

  • Hi,

    I execute [dbo].[sp_WhoIsActive] @get_plans=1,@get_additional_info=1 on SQL Server. But how I can join the resultset from SP_WhoIsActive with below SQL statement (join them with Session_Id)?

    select CONTEXT_INFO from sys.dm_exec_sessions where program_name like '%SAP%'

    Thanks

  • Anyone can help?

    Thanks,

  • Yes. Ask the author of sp_WhoIsActive. 😉 Or learn how to use OPENROWSET. :w00t:

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply