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.
- Execution Plan – Estimated vs Actual – SQL in Sixty Seconds #113
- Who Dropped Your Table? – SQL in Sixty Seconds #112
- Single Column Single Row and TABLE SCAN – SQL in Sixty Seconds #111
- Dirty Read with NOLOCK – SQL in Sixty Seconds #110
- Undo Human Errors in SQL Server – SQL in Sixty Seconds #109 – Point in Time Restore
- Solve Puzzle about Data type – SQL in Sixty Seconds #108
- Move TempDB for Performance – SQL in Sixty Seconds #107
- Do MAX(col) Scan Table? – SQL in Sixty Seconds #106
- Rollback TRUNCATE – Script – SQL in Sixty Seconds #105
- SQL SERVER – Live Query Statistics – SQL in Sixty Seconds #104
- SQL SERVER – Offline, Detach and Drop – Differences – SQL in Sixty Seconds #103
- Are Not Equal to Operators Equal to Not In? – SQL in Sixty Seconds #102
- Negative Identity Column – SQL in Sixty Seconds #101
- Patch Your SQL Server – SQL in Sixty Seconds #100
- Keyword Join or Inner Join – SQL in Sixty Seconds #099
Let me know what you think about my SQL in the Sixty Seconds.
Reference: Pinal Dave (https://blog.sqlauthority.com)