Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to:
SQL Server
Azure SQL Managed Instance
Returns the number of disk write errors encountered by SQL Server since SQL Server last started.
Transact-SQL syntax conventions
@@TOTAL_ERRORS
integer
Not all write errors encountered by SQL Server are accounted for by this function. Occasional non-fatal write errors are handled by the server itself and are not considered errors. To display a report containing several SQL Server statistics, including total number of errors, run sp_monitor.
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's the result set.
Errors As of
----------- ----------------------
0 3/28/2003 12:32:11 PM
sp_monitor (Transact-SQL)
System Statistical Functions (Transact-SQL)