How to track Microsoft SQL Server performance

 
Your Sql Server keeps data of how much work it has done with the help of some series of the function, you can get these information from these function by executing sp_monitor, means you can know performance statistics of the Sql Server with the help of sp_monitor.

Example:

Execute this query and see the result:

USE master
EXEC sp_monitor

Output explanation:

the following are the information of the returned data from the query:
last_run
Time sp_monitor was last run.

current_run
Time sp_monitor is being run.

seconds
Number of elapsed seconds since sp_monitor was run.

cpu_busy
Number of seconds that the server computer’s CPU has been doing SQL Server work.

io_busy
Number of seconds that SQL Server has spent doing input and output operations.

idle
Number of seconds that SQL Server has been idle.

packets_received
Number of input packets read by SQL Server.

packets_sent
Number of output packets written by SQL Server.

packet_errors
Number of errors encountered by SQL Server while reading and writing packets.

total_read
Number of reads by SQL Server.

total_write
Number of writes by SQL Server.

total_errors
Number of errors encountered by SQL Server while reading and writing.

connections
Number of logins or attempted logins to SQL Server.

One more thing – some data is printed in the form of num1 (num2) – num3%. The num1 refers to the number of seconds or the total number since Sql Server was restarted. num2 refers to the number of seconds or total number since the last time sp_monitor was run and num3 is the percentage of time since sp_monitor was last run. suppose if cpu_busy data is 456(35)-25% then it means that the CPU has been busy 456 seconds since your Sql Server was last started up, 35 seconds since sp_monitor was last run, and 25 % of the total time since sp_monitor was last run.

Similarly if packet_received data is 450 (45) then it means your Sql Server reads 450 input packets since it was restarted and 45 packets during executing sp_monitor.