Last active
August 29, 2015 14:03
-
-
Save dazfuller/040d0913e59d8c198b22 to your computer and use it in GitHub Desktop.
Find physical server locations for File Streams
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT t.name AS 'table', | |
c.name AS 'column', | |
fg.name AS 'filegroup_name', | |
dbf.type_desc AS 'type_description', | |
dbf.physical_name AS 'physical_location' | |
FROM sys.filegroups fg | |
INNER JOIN sys.database_files dbf | |
ON fg.data_space_id = dbf.data_space_id | |
INNER JOIN sys.tables t | |
ON fg.data_space_id = t.filestream_data_space_id | |
INNER JOIN sys.columns c | |
ON t.object_id = c.object_id | |
AND c.is_filestream = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment