Databases Reference
In-Depth Information
System
Variable Name
Return Type
Description
Value of the most recent error within the current user session.
Error numbers (from the sysmessages table) are used to
determine the status of an error condition.
@@ERROR
Int
Value of the most recently generated identity value. This is
typically the result of an identity column insert.
@@IDENTITY
Numeric
Number of rows affected by, or returned by, the last operation.
@@ROWCOUNT
Int
Number of currently active transactions. Used to determine
the number of nested transactions. The maximum number of
nested transactions is 11.
@@TRANCOUNT
Int
System Statistical
Variable Name
Return Type
Description
The total connects that have been opened or attempted since
the SQL Server service was last started.
@@CONNECTIONS
Int
The total time in milliseconds that the server has not been
idle since the SQL Server service was last started.
@@CPU_BUSY
Int
The total time in milliseconds that the server has been idle
since the SQL Server service was last started.
@@IDLE
Int
The total time in milliseconds that the server has performed
physical disk I/O operations since the SQL Server service
was last started.
@@IO_BUSY
Int
The total number of network packets received by the server
since the SQL Server service was last started.
@@PACK_RECEIVED Int
The total number of network packets sent by the server since
the SQL Server service was last started.
@@PACK_SENT
Int
The total number of network packet errors that have
occurred since the SQL Server service was last started.
@@PACKET_ERRORS Int
The number of milliseconds per CPU tick. Each tick takes
1/32 of a second.
@@TIMETICKS
Int
The total number of disk read/write errors that have
occurred, while performing physical disk I/O, since the SQL
Server service was last started.
@@TOTAL_ERRORS
Int
The total number of physical disk reads that have occurred
since the SQL Server service was last started.
@@TOTAL_READ
Int
The total number of physical disk writes that have occurred
since the SQL Server service was last started.
@@TOTAL_WRITE
Int
Search WWH ::




Custom Search