Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2.23 KB

File metadata and controls

65 lines (51 loc) · 2.23 KB
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
@@TOTAL_WRITE
@@TOTAL_WRITE_TSQL
dev_langs
TSQL
helpviewer_keywords
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]
ms.assetid cd528126-51ee-4aa4-a21f-f32ce5c80fac
author MikeRayMSFT
ms.author mikeray

@@TOTAL_WRITE (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

Returns the number of disk writes by [!INCLUDEssNoVersion] since [!INCLUDEssNoVersion] was last started.

Topic link icon 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)