17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

@@IDLE<br />

Returns the time in milliseconds (based on the resolution of the system timer) that <strong>SQL</strong> <strong>Server</strong> has been<br />

idle since it was last started.<br />

You can think of this one as being something of the inverse of @@CPU_BUSY. Essentially, it tells you how<br />

much time your <strong>SQL</strong> <strong>Server</strong> has spent doing nothing. If anyone finds a programmatic use for this one,<br />

send me an e-mail — I’d love to hear about it (I can’t think of one).<br />

@@IO_BUSY<br />

Returns the time in milliseconds (based on the resolution of the system timer) that <strong>SQL</strong> <strong>Server</strong> has spent<br />

doing input and output operations since it was last started. This value is reset every time <strong>SQL</strong> <strong>Server</strong> is<br />

started.<br />

This one doesn’t really have any rocket science to it, and it is another one of those that I find falls into the<br />

“no real programmatic use” category.<br />

@@PACK_RECEIVED and @@PACK_SENT<br />

Respectively return the number of input packets read/written from/to the network by <strong>SQL</strong> <strong>Server</strong> since<br />

it was last started.<br />

Primarily, these are network troubleshooting tools.<br />

@@PACKET_ERRORS<br />

Returns the number of network packet errors that have occurred on connections to your <strong>SQL</strong> <strong>Server</strong><br />

since the last time the <strong>SQL</strong> <strong>Server</strong> was started.<br />

Primarily a network troubleshooting tool.<br />

@@TIMETICKS<br />

Returns the number of microseconds per tick. This varies by machines and is another of those that falls<br />

under the category of “no real programmatic use.”<br />

@@TOTAL_ERRORS<br />

Apendix A: System Functions<br />

Returns the number of disk read/write errors encountered by the <strong>SQL</strong> <strong>Server</strong> since it was last started.<br />

Don’t confuse this with runtime errors or as having any relation to @@ERROR. This is about problems<br />

with physical I/O. This one is another of those of the “no real programmatic use” variety. The primary<br />

use here would be more along the lines of system diagnostic scripts. Generally speaking, I would use<br />

Performance Monitor for this instead.<br />

589

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!