SQL7 CPU 99% - help?

  • From time-to-time, my CPU gets pegged at 99% running the SQL service. Is there any way to find out /what/ it's doing that would consume all the cycles?

  • Did you try sp_who2 to see what is running?

    Darren


    Darren

  • But that doesn't show me which process is using all the CPU (they all read 0).

  • Try setting a trace event (sp_trace_setevent)

    using the column_id = 18 which shows the CPU time. Would that help?

    Darren


    Darren

  • Um, I don't think I have that procedure; is that SQL 2k?

  • I would actually connect to the server or go to the console and run Task Manager and see which process is using all the CPU. It sounds like the results from sp_who2 showed no SQL process having high CPU cycles so, it may be something else is hitting the processor.

    Just my thoughts.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Well, that's where I'm getting my information. The task manager shows sqlservr.exe =99%, but I can't find out /what/ is taking all the cpu.

  • Run performance monitor to see which processes are consuming the CPUs. Are any other applications except SQL Server running in same box?

    If you comfirm the high CPU usage is caused by SQL Server, Run Profiler to trace the queries that have high CPU usage and examine the query's execution plan and indexes.

  • Ah, I think I've found what I need. I didn't know about the Profiler; it looks like it can tell me exactly what I need to know. Thanks Allen.

    Oblio

Viewing 9 posts - 1 through 8 (of 8 total)

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