Custom Query

Members, I would like to create a TSQL similar to 

SELECT SPID, [Last Command], user, [Login Time], [Last Batch] 

FROM [SomeHIstoryTable with crazy joins]

ORDER BY [Login Time]

Anyone have a tools box of DM TSQL queries they could share.

Thank you 

Parents
No Data
Reply
  • On a particular server I highly recommend to look at Adam Machanics sp_whoisactive (http://whoisactive.com/)

    If you want to pull the data out of the DM repository, I guess the data is binary encoded in the SessionList field of the ServerActivity table. But I have no idea how to decode that data.

    Cheers,
    Daniel

Children