Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check which job is running cpu time up to 90% 1

Status
Not open for further replies.

ptp491

IS-IT--Management
Dec 8, 2004
59
0
0
CA
Hi,
We have a website that had 8 web server and 3 db servers, data is distributed on 3 server unevenly, DB1 is bigger and better server and DB2 and 3 are smaller so they handle less data and jobs.

We upgraded to SQL 2005 so we get better performance, so performance got better but cpu on only db1 is going very too high(mostly 80%), it was not like this when we upgraded them.

I was wondering if anyone knows a solution to find out what is driving cpu utilization so high.

Thanks.
 
Run PerfMon and Profiler. This should help you figure out when this is happening and which job / query is doing it.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
run sp_who2 in query analyzer and check the CPUTime for each SPID. You can then take the SPID number in this code to get the statement using the CPU.

Code:
declare @handle binary(20)
select @handle = sql_handle 
from master.dbo.sysprocesses where spid = [COLOR=red]your SPID here[/color]
select * from ::fn_get_sql(@handle)

- Paul
- Database performance looks fine, it must be the Network!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top