Is there any quick way to find out what site on a server would be using all the CPU with a SQL query? As randomly the CPU is just sitting as 100% and I don't know why?
feedback
|
migrated from stackoverflow.com Aug 24 '09 at 5:52
This question came from our site for professional and enthusiast programmers.
|
It would definitely help knowing the version of SQL Server you're using. I'll consider you use SQL Server 2005 as is the most common these days. To identify the cause of the problem I recommend you download the Performance Dashboard reports. After you installed the custom reports and run then deployment script as detailed in Additional Information section of the download page, you open the custom Other resources of interest are:
With this investigations completed, you should be able to identify the problem:
Success! | |||
|
feedback
|
|
There is an Activity Monitor in Microsoft SQL Management Studio that will show the most expensive queries and their cpu time. Just right click on the server in the server explorer window and click "Activity Monitor" | |||
|
feedback
|
|
You should run SQL Server Profiler to help you determine where there are some inefficient queries that are causing large read/write times. As for quick... Well, you could run it for a minute or two, and that should give you an indication of whether there are some SPs/queries that are being run more than expected. Please also read this question, and its accepted answer. | |||
|
feedback
|
|
If SQL Server Profiler won't help, you may start to think about any possible worm attack. | |||
|
feedback
|
|
good article, profiler is running so fast can not see which query is taking time, i will have a look into the activity monitory. | |||
|
feedback
|