| title | @@TOTAL_ERRORS (Transact-SQL) | Microsoft Docs | |||||||
|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||
| ms.date | 09/18/2017 | |||||||
| ms.prod | sql | |||||||
| ms.prod_service | sql-database | |||||||
| ms.reviewer | ||||||||
| ms.technology | t-sql | |||||||
| ms.topic | language-reference | |||||||
| f1_keywords |
|
|||||||
| dev_langs |
|
|||||||
| helpviewer_keywords |
|
|||||||
| ms.assetid | 09e62428-ee0e-4ef5-b969-da9d255f1199 | |||||||
| author | MikeRayMSFT | |||||||
| ms.author | mikeray |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Returns the number of disk write errors encountered by [!INCLUDEssNoVersion] since [!INCLUDEssNoVersion] last started.
Transact-SQL Syntax Conventions
@@TOTAL_ERRORS
integer
Not all write errors encountered by [!INCLUDEssNoVersion] 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 [!INCLUDEssNoVersion] statistics, including total number of errors, run sp_monitor.
This example shows the number of errors encountered by [!INCLUDEssNoVersion] as of the current date and time.
SELECT @@TOTAL_ERRORS AS 'Errors', GETDATE() AS 'As of';
[!INCLUDEssResult]
Errors As of
----------- ----------------------
0 3/28/2003 12:32:11 PM
sp_monitor (Transact-SQL)
System Statistical Functions (Transact-SQL)