Active Running SQL Statements

  • In oracle, its quite easy to find what is currently running and what was run in a particular period of time. I need to get same details in SQL server 2005. Please help how can I find that out?

    Thank a lot.

    Gosha

  • Look up "Dynamic Management Views and Functions" in Books Online, you'll find what SQL 2005 has for that kind of thing.

    For example, sys.dm_exec_connections, will give you data about the connections currently open. sys.dm_exec_sql_text will give you the text of the queries. sys.dm_exec_requests has a ton of data about the code running, including CPU use, etc.

    There are a bunch more. Check out the chapter, see if it gives you what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks a bunch. Thats a great help.

  • DBCC_opentran

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

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