Applies To: SQL Server 2014, SQL Server 2016 Preview
Returns I/O statistics for data and log files. This dynamic management view replaces the fn_virtualfilestats function.
Applies to: SQL Server (SQL Server 2008 through current version).
- database_id | NULL
ID of the database. database_id is int, with no default. Valid inputs are the ID number of a database or NULL. When NULL is specified, all databases in the instance of SQL Server are returned.
The built-in function DB_ID can be specified.
- file_id | NULL
ID of the file. file_id is int, with no default. Valid inputs are the ID number of a file or NULL. When NULL is specified, all files on the database are returned.
The built-in function FILE_IDEX can be specified, and refers to a file in the current database.
ID of database.
ID of file.
Applies to: SQL Server 2016 Community Technology Preview 2 (CTP2) through SQL Server 2016
Applies to: SQL Server 2008 through SQL Server 2014
Number of milliseconds since the computer was started. This column can be used to compare different outputs from this function.
Number of reads issued on the file.
Total number of bytes read on this file.
Total time, in milliseconds, that the users waited for reads issued on the file.
Number of writes made on this file.
Total number of bytes written to the file.
Total time, in milliseconds, that users waited for writes to be completed on the file.
Total time, in milliseconds, that users waited for I/O to be completed on the file.
Number of bytes used on the disk for this file. For sparse files, this number is the actual number of bytes on the disk that are used for database snapshots.
Windows file handle for this file.
Total IO latency introduced by IO resource governance for reads. Is not nullable. For more information, see sys.dm_resource_governor_resource_pools (Transact-SQL).
Total IO latency introduced by IO resource governance for writes. Is not nullable.
Requires VIEW SERVER STATE permission. For more information, see Dynamic Management Views and Functions (Transact-SQL).