Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Jim Beam
Posting Yak Master
137 Posts |
Posted - 2010-12-17 : 19:09:10
|
Hi all, A user emails you that he's suffering performance issues on a particular app/db. You go to Activity Monitor and see that indeed that CPU/Wait Time etc are inordinately high, and you want to see what sql is being run, and whether it is in the form of a Sproc, injected SQL or a scheduled job firing in response.Where would you find this out? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-12-18 : 03:11:37
|
Wait times are cumulative for the current wait. When the thread stops waiting, it's set back to 0.--Gail ShawSQL Server MVP |
 |
|
Jim Beam
Posting Yak Master
137 Posts |
Posted - 2010-12-18 : 07:50:42
|
quote: Originally posted by tkizer DBCC INPUTBUFFER(spidNoGoesHere), run a trace, or query the DMVs.CPU being high can be okay in activity monitor as it's a cumulative number since that session has logged on. Wait time could be cumulative too, can't remember at the moment and not near BOL.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
Thanks Tara. Am I right in thinking that the decision of which tool to use is something of a sliding scale between speed and detail, ie if you want a quick, broad idea you'd use the Input Buffer from the comfort of your own Management Studio, but if you want a thorough audit of the problem you'd use a trace? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Jim Beam
Posting Yak Master
137 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|