@@TOTAL_ERRORS (T-SQL)

Returns the number of disk read/write errors encountered by Microsoft® SQL Server™ since it was last started.

Syntax

@@TOTAL_ERRORS

Return Types

integer

Remarks

To display a report containing several SQL Server statistics, including total number of errors, run sp_monitor.

Examples

This example shows the number of errors encountered by SQL Server as of the current date and time.

SELECT @@TOTAL_ERRORS AS 'Errors', GETDATE() AS 'As of'

  

Here is the result set:

Errors         As of                         

-------        -------------------------------

0              1998-04-21  22:07:30.013      

  

See Also
sp_monitor System Statistical Functions

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.