How to Get Volume Mount Point for SQL Server Files? – Interview Question of the Week #295

Question: How to Get Volume Mount Point for SQL Server Files?

Answer: I was asked this question by my client during the recent  Comprehensive Database Performance Health Check. You run the following script to get all the necessary information about the Mount Point for SQL Server Files.

SELECT name, volume_mount_point, logical_volume_name, 
file_system_type, physical_name, type_desc, state_desc
FROM sys.master_files AS f
CROSS APPLY sys.dm_os_volume_stats(f.database_id, f.file_id); 

When you run the script above it will give you an answer as described in the following image:

Well, that’s it for today. If you have any questions, you can reach out to me on twitter.

Here are a few recent blog posts which you may find interesting.

Let me know what you think about my SQL in the Sixty Seconds.

Reference: Pinal Dave (https://blog.sqlauthority.com

Menu
Exit mobile version