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?

Telescope and microscope icons with the title 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:

Volume Mount Point

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.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

Computer Network, SQL Scripts, SQL Server
Previous Post
SQL SERVER – Simple Explanation FORCE DEFAULT CARDINALITY ESTIMATION
Next Post
How to Change Database File Size? – Interview Question of the Week #296

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.