SP_MONITOR is a SQL Server Database Engine system stored procedure which is used to Display statistics about Microsoft SQL Server.
It returns two code values either o or 1
0 means success
1 means failure
Following statement uses sp_monitor system stored procedure to display the statistics.
Here result set showing CPU busy – 177717(240)-35%, it means the CPU has been busy 177717 seconds since SQL Server was last started up and 240 seconds since sp_monitor was last run and 35 percent of the total time since sp_monitor was last run.
Following is the complete description for sp_monitor stored procedure output.
|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.|
1,397 total views, 4 views today