patternsqlMinor
Enumerate drives available to SQL Server
Viewed 0 times
availablesqldrivesserverenumerate
Problem
I'm trying to work out a way of listing the drives that a particular instance of SQL Server is "aware" of, and understand the process.
I can run
By what process does SQL server become "aware" of a drive and is there any way to problematically determine the drives it is aware of?
Thanks in advance!
I can run
EXEC master..xp_fixeddrives which gives me a list of drives, but when I look in the GUI (Eg. Databases | Restore Database | From device | Add ) the list of available drives is far fewer.By what process does SQL server become "aware" of a drive and is there any way to problematically determine the drives it is aware of?
Thanks in advance!
Solution
I'm guessing you're actually running on a clustered instance.
EXEC master..xp_fixeddrives is returning all the drives that the underlying OS is aware of, so a lot aren't available to your cluster instance
use:
instead, which will just list the ones available to your instance
EXEC master..xp_fixeddrives is returning all the drives that the underlying OS is aware of, so a lot aren't available to your cluster instance
use:
SELECT * FROM sys.dm_io_cluster_shared_drivesinstead, which will just list the ones available to your instance
Code Snippets
SELECT * FROM sys.dm_io_cluster_shared_drivesContext
StackExchange Database Administrators Q#25796, answer score: 4
Revisions (0)
No revisions yet.