| title | @@TOTAL_WRITE (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 | cd528126-51ee-4aa4-a21f-f32ce5c80fac | |||||
| author | MikeRayMSFT | |||||
| ms.author | mikeray |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Returns the number of disk writes by [!INCLUDEssNoVersion] since [!INCLUDEssNoVersion] was last started.
Transact-SQL Syntax Conventions
@@TOTAL_WRITE
integer
To display a report containing several [!INCLUDEssNoVersion] statistics, including read and write activity, run sp_monitor.
The following example shows returning the total number of disk reads and writes as of the current date and time.
SELECT @@TOTAL_READ AS 'Reads', @@TOTAL_WRITE AS 'Writes', GETDATE() AS 'As of'
[!INCLUDEssResult]
Reads Writes As of
----------- ----------- ----------------------
7760 97263 12/5/2006 10:23:00 PM
sp_monitor (Transact-SQL)
System Statistical Functions (Transact-SQL)
@@TOTAL_READ (Transact-SQL)