Skip to content

Instantly share code, notes, and snippets.

@dazfuller
Last active August 29, 2015 14:03
Show Gist options
  • Save dazfuller/040d0913e59d8c198b22 to your computer and use it in GitHub Desktop.
Save dazfuller/040d0913e59d8c198b22 to your computer and use it in GitHub Desktop.
Find physical server locations for File Streams
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