SQL 2012 using excessive CPU usage

Posted on 2014-07-30
Last Modified: 2014-09-02
Hi Experts,

I have noticed my SQL 2012 server is running between 87-95% CPU usage. The environment is a Windows Server 2012 with SQL 2012 standard installed, the server is not used for anything else other than VPN occasionally. We only have one instance running and the CPU is a 3.4GHz Quad Core Xeon and task manager is reporting SQLSERVER using all the CPU.

I would like to identify where this is being used, weather there is a leak or it is legitimate and i need a secondary CPU.

Look forward to reading your solutions.
Question by:isdd2000
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 13

Expert Comment

ID: 40228606
You check the CPU usage  from  command of "taskmgr.exe" and click "resource monitor"
at the performance tab.

You could download the MS ProcessExplorer to look into more in detail at this
site to find which process is getting high cpu usage,

LVL 17

Accepted Solution

Barry Cunney earned 500 total points
ID: 40228611
You can use the following SQL to identify what exactly is running in SQL Server - this will give a picture of the workload being carried out in SQL server and may give some ideas on the CPU usage
,qt.text AS [Parent Query]
,session_Id AS [Spid]
,DB_NAME(sp.dbid) AS [Database]
,SUBSTRING (qt.text, (er.statement_start_offset/2) + 1, --#1
((CASE WHEN er.statement_end_offset = -1
ELSE er.statement_end_offset
END - er.statement_start_offset)/2) + 1) AS [Individual Query]
FROM sys.dm_exec_requests er --#2
INNER JOIN sys.sysprocesses sp ON er.session_id = sp.spid
CROSS APPLY sys.dm_exec_sql_text(er.sql_handle)as qt
WHERE session_Id > 50
AND session_Id NOT IN (@@SPID)

Open in new window


Author Closing Comment

ID: 40300240
Issue ended up related to debug logging

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question