SQLTeam.com | Weblogs | Forums

Get FileTable Share Folder and subfolders from server and database



I need a way to query the server to get what is the share name it is configured for filestream, and then query the database to see the folder it is using and finally the table itself. The purpose is to be able to locate a file no mater how the end user configures his own server.

Thank you



Is this what you are looking for?

SELECT FILETABLEROOTPATH('schemaName.tableName', 0) rootUncToTable

SELECT a.file_stream.PathName(0) uncToFile
FROM schemaName.tableName a