How to find all the FILESTREAM directory names - for both levels of directory

You have to run this query through the DAC as it’s accessing undocumented, hidden system tables.

How to: Use the Dedicated Administrator Connection with SQL Server Management Studio

Microsoft SQL Server provides a dedicated administrator connection (DAC). The DAC allows an administrator to access a running instance of SQL Server Database Engine to troubleshoot problems on the server—even when the server is unresponsive to other client connections. The DAC is available through the sqlcmd utility and SQL Server Management Studio. The connection is only allowed from a client running on the server. No network connections are permitted.

To use SQL Server Management Studio with the DAC, connect to an instance of the SQL Server Database Engine with Query Editor by typing ADMIN: before the server name. Object Explorer cannot connect using the DAC.

SELECT o.name AS [Table],
cp.name AS [Column],
p.partition_number AS [Partition],
r.rsguid AS [Rowset GUID],
rs.colguid AS [Column GUID]
FROM sys.sysrowsets r
CROSS APPLY sys.sysrscols rs
JOIN sys.partitions p ON rs.rsid = p.partition_id
JOIN sys.objects o ON o.object_id = p.object_id
JOIN sys.syscolpars cp ON cp.colid = rs.rscolid
WHERE rs.colguid IS NOT NULL AND o.object_id = cp.id
AND r.rsguid IS NOT NULL AND r.rowsetid = rs.rsid;

Update me when site is updated

Leave a Reply

You must be logged in to post a comment.