Quickly Check SQL Server CPU Pressure

Share via:

Quickly Check SQL Server CPU Pressure

Following query results how many threads are waiting to be executed on the server, if there are more than two threads waiting to be executed on a server, then that server can be assumed to have a CPU bottleneck and this is a first sign that you need to start troubleshooting the issue in this area.

 

IF OBJECT_ID(‘tempdb..#CPUTemp’) IS NOT NULL
Drop Table #CPUTemp

Create Table #CPUTemp (States varchar(300), TValue varchar(30))
insert into #CPUTemp(States, TValue)
EXEC(‘dbcc sqlperf(umsstats)’)

select * from #CPUTemp where States like ‘%num runnable’ and TValue > ‘2’

 

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (14 votes, average: 5.00 out of 5)
Loading...

3 thoughts on “Quickly Check SQL Server CPU Pressure

Add Comment