Udostępnij za pośrednictwem


sys.dm_io_cluster_shared_drives

This view returns the drive name of each of the shared drives if the current server instance is a clustered server. If the current server instance is not a clustered instance it returns an empty rowset.

Column name Data type Description

DriveName

nchar(2)

The name of the drive (the drive letter) that represents an individual disk taking part in the cluster shared disk array. Column is not nullable.

Remarks

When clustering is enabled, the failover cluster instance requires data and log files to be on shared disks so that they may be accessed after the instance fails over to another node. Each of the rows in this view represents a single shared disk which is used by this clustered SQL Server instance. Only disks listed by this view can be used to store data or log files for this instance of SQL Server. The disks listed in this view are those that are in the cluster resource group associated with the instance. To add disks to, or remove disks from, this list, see How to: Add Dependencies to a SQL Server 2005 Resource.

Note

This view will eventually replace the fn_servershareddrives function which will be deprecated in a future release.

Permissions

The user must have VIEW SERVER STATE permission for the SQL Server instance.

Examples

The following example uses sys.dm_io_cluster_shared_drives to determine the shared drives on a clustered server instance:

SELECT * FROM sys.dm_io_cluster_shared_drives

This is the result set:

DriveName

---------

m

n

See Also

Reference

sys.dm_os_cluster_nodes
fn_servershareddrives (Transact-SQL)
Dynamic Management Views and Functions

Other Resources

How to: Add Dependencies to a SQL Server 2005 Resource

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

17 July 2006

New content:
  • Added an example.
Changed content:
  • Updated Description, Remarks, and See Also sections.
  • Changed permissions requirement from server level to instance level.