Home » SQL SERVER SP_MONITOR

SQL SERVER SP_MONITOR

SP_MONITOR is a SQL Server Database Engine system stored procedure which is used to Display statistics about Microsoft SQL Server.





SYNTAX

EXEC sp_monitor

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.

EXEC sp_monitor

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.

 

Also Read..

SQL Server sp_executesql

SQL Server Startup procedures Sp_Procoption

SQL Server Sp_helptext




SQL Basics TutorialSQL Advance TutorialSSRSInterview Q & A
SQL Create tableSQL Server Stored ProcedureCreate a New SSRS Project List Of SQL Server basics to Advance Level Interview Q & A
SQL ALTER TABLESQL Server MergeCreate a Shared Data Source in SSRSSQL Server Question & Answer Quiz
SQL DropSQL Server PivotCreate a SSRS Tabular Report / Detail Report
..... More.... More....More
Power BI TutorialAzure TutorialPython TutorialSQL Server Tips & Tricks
Download and Install Power BI DesktopCreate an Azure storage accountLearn Python & ML Step by stepEnable Dark theme in SQL Server Management studio
Connect Power BI to SQL ServerUpload files to Azure storage containerSQL Server Template Explorer
Create Report ToolTip Pages in Power BICreate Azure SQL Database ServerDisplaying line numbers in Query Editor Window
....More....More....More

 466 total views,  2 views today

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.