Skip to content

Commit dc1f5bd

Browse files
authored
Merge pull request #10557 from pmasl/patch-566
Update sys-dm-os-volume-stats-transact-sql.md
2 parents 4ccd14f + e8fea5b commit dc1f5bd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/relational-databases/system-dynamic-management-views/sys-dm-os-volume-stats-transact-sql.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "sys.dm_os_volume_stats (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "02/02/2017"
4+
ms.date: "06/06/2019"
55
ms.prod: sql
66
ms.reviewer: ""
77
ms.technology: system-objects
@@ -21,7 +21,7 @@ ms.author: sstein
2121
manager: craigg
2222
---
2323
# sys.dm_os_volume_stats (Transact-SQL)
24-
[!INCLUDE[tsql-appliesto-ss2008-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-xxxx-xxxx-xxx-md.md)]
24+
[!INCLUDE[tsql-appliesto-2008R2SP1-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-2008R2sp1-xxxx-xxxx-xxx-md.md)]
2525

2626
Returns information about the operating system volume (directory) on which the specified databases and files are stored in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Use this dynamic management function to check the attributes of the physical disk drive or return available free space information about the directory.
2727

@@ -62,14 +62,14 @@ sys.dm_os_volume_stats (database_id, file_id)
6262
## Security
6363

6464
### Permissions
65-
Requires VIEW SERVER STATE permission.
65+
Requires `VIEW SERVER STATE` permission.
6666

6767
## Examples
6868

6969
### A. Return total space and available space for all database files
7070
The following example returns the total space and available space (in bytes) for all database files in the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
7171

72-
```
72+
```sql
7373
SELECT f.database_id, f.file_id, volume_mount_point, total_bytes, available_bytes
7474
FROM sys.master_files AS f
7575
CROSS APPLY sys.dm_os_volume_stats(f.database_id, f.file_id);
@@ -78,7 +78,7 @@ CROSS APPLY sys.dm_os_volume_stats(f.database_id, f.file_id);
7878
### B. Return total space and available space for the current database
7979
The following example returns the total space and available space (in bytes) for the database files in the current database.
8080

81-
```
81+
```sql
8282
SELECT database_id, f.file_id, volume_mount_point, total_bytes, available_bytes
8383
FROM sys.database_files AS f
8484
CROSS APPLY sys.dm_os_volume_stats(DB_ID(f.name), f.file_id);

0 commit comments

Comments
 (0)