title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@TOTAL_WRITE (Transact-SQL) |
@@TOTAL_WRITE (Transact-SQL) |
MikeRayMSFT |
mikeray |
09/18/2017 |
sql |
t-sql |
reference |
|
|
|
[!INCLUDE SQL Server Azure SQL Managed Instance]
Returns the number of disk writes by [!INCLUDEssNoVersion] since [!INCLUDEssNoVersion] was last started.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: 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)