lunes, 9 de enero de 2012

How to know what SQL instance is using more CPU?

Suposing you have several SQL Server instances running in same cluster, on this particular case, in the same node and the application team is reporting to you peformance issues. You review the server and see the CPU usage is highter. 

First you need to identify what is the instance causing the high CPU usage. 

We have 2 ways to check what SQL instance is consuming high CPU in the server.

The Easy and fast way.

Your need to identifity the process ID for any instance running in the server for it you can do some of the following actions:

  • Take a Look in each instance at SQL server log, read the error log and find the line that indicates “Server Process ID is 6404.”
  • Run the following query on each sql instance:

     SELECT serverproperty('ServerName') AS Instance, serverproperty('ProcessID') 



Now follow the next steps:
  1. Connect to the cluster node by RDP
  2. Go to task manager
  3. Go to processes tab
  4. From Menu select View-> Select Columns
  5. From the list of columns highlight PID (Select Process identifier)














The hard way. (Be careful with this option because can affect server performance)   



  1.      Open Windows Performance Monitor
  2.      Add Counters
  3.      Select Process from Performance Object
  4.      Select % Processor Time from the Counters
  5.      Select ID Process
  6.      And select sql server instances



Any question please contact me at: sqlexpertsrucs@gmail.com

















No hay comentarios:

Publicar un comentario