-- http://www.sqlskills.com/blogs/paul/filestream-directory-structure-where-do-the-guids-come-from/
-- uruchamiac pod DAC

USE PLSSUG_DEMO2;
GO

SELECT
	o.name AS [Table],
    cp.name AS [Column],
    p.partition_number AS [Partition],
    r.rsguid AS [Rowset GUID],
    rs.colguid AS [Column GUID],
	CAST(r.rsguid AS UNIQUEIDENTIFIER) AS [Rowset UNIQUEIDENTIFIER],
	CAST(rs.colguid AS UNIQUEIDENTIFIER) AS [Column UNIQUEIDENTIFIER]
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;
GO