I have a file Stream Sample database , I have added records into table. When I use file.PathName() my sample project in c# SqlFileStream class recognize this address and retrieve my file but did not show in windows file Explorer? What is this address? Is it fake address?This class may look at FileGroup path for finding real address?if not how this class find path?
\ComputerName\SQL2016\v02-A60EC2F8-2B24-11DF-9CC3-AF2E56D89593\FileStreamTestDB\dbo\BLOB_Table\FileData\00953530-2F65-4AC9-81E9-0281EFB89592\VolumeHint-HarddiskVolume3
Data in a
FILESTREAM
column are stored inside of the database. You can see the internal files stored in the database by browsing the local file systemFILESTREAM
filegroup directory but that path is not exposed for remote access and shouldn't be used at all. You'll need to useSqlFileStream
to get a handle for access toFILESTREAM
data via the Win32 API.If you want to access files stored in the database via Windows Explorer or any other application, consider using
Filetable
instead. AFileTable
leveragesFILESTEAM
internally but exposes the files stored in the table via a UNC path for non-transactional access. That allows files to be added/change/deleted via the share just regular files or with T-SQL INSERT/UPDATE/DELETE statements. In both cases, the changes are stored in the databaseFileTable
and reflected in theFileTable
directory share too.