Table of Contents
ToggleSQL Server statistical functions operate on tables and views while leveraging the full capabilities of SQL Server’s parallelism, scalability, and security mechanisms. These functions can be seamlessly embedded within SQL queries to gain insights into system performance and metrics.
| Sr.No. | Function | Description |
|---|---|---|
| 1 | @@CONNECTIONS() |
Returns number of attempted connections. |
| 2 | @@CPU_BUSY() |
Returns amount of time, SQL server spent on an active operation. |
| 3 | @@IDLE() |
Returns the total idle time of this SQL server. |
| 4 | @@IO_BUSY() |
Returns the total spent time by this SQL server on performing the input and output operations. |
| 5 | @@PACK_RECEIVED() |
Returns the number of input packets. |
| 6 | @@PACK_SENT() |
Returns the number of output packets. |
| 7 | @@PACKET_ERRORS() |
Returns the number of network packet errors. |
| 8 | @@TIMETICKS() |
Returns the number of microseconds per tick. |
| 9 | @@TOTAL_ERRORS() |
Returns the number of disk errors. |
| 10 | @@TOTAL_READ() |
Returns the number of disk reads. |
| 11 | @@TOTOAL_WRITE() |
Returns the number of disk writes. |
