Identify Long Running Queries (include LoginName and HostName in results)

  • speja01

    SSC Eights!

    Points: 984

    Hi Everyone,

    I'm hoping someone can point me in the right direction. I would like to identify and log all the poor performing queries in my data warehouse. I know this could easily be accomplished by running a trace through profiler with a filter on duration but I want to avoid running a 24/7 trace. The dmv sys.dm_exec_query_stats provides 99% of the information I need but is missing 2 very important pieces on information I need...Loginname and HostName. Not only do I want to identify the poor performing SQL but I also want to know where it originated from and who performed it. Is it possible to obtain this information without capturing it through profiler?

    Any help would be appreciated!


  • Marcin Gol

    Hall of Fame

    Points: 3314

    you can run trace without profiler, is it interesting to you ?

  • speja01

    SSC Eights!

    Points: 984

    Yes..Please explain.



    Points: 11831


    Refer the Gail shaw remarks,

Viewing 4 posts - 1 through 4 (of 4 total)

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