Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 2.07 KB

total-write-transact-sql.md

File metadata and controls

61 lines (48 loc) · 2.07 KB
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
@@TOTAL_WRITE
@@TOTAL_WRITE_TSQL
write activity since last started [SQL Server]
number of disk writes
@@TOTAL_WRITE function
disks [SQL Server], number of disk writes
total write [SQL Server]
TSQL

@@TOTAL_WRITE (Transact-SQL)

[!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

Syntax

@@TOTAL_WRITE  

Return Types

integer

Remarks

To display a report containing several [!INCLUDEssNoVersion] statistics, including read and write activity, run sp_monitor.

Examples

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   

See Also

sp_monitor (Transact-SQL)
System Statistical Functions (Transact-SQL)
@@TOTAL_READ (Transact-SQL)