When the FILESTREAM feature is activated on Microsoft SQL Server 2012 then SQL Server will create a "hidden" share on the system. The share is defined as follows:
Sharename FILESTREAM_SHARE
Path \\?\GLOBALROOT\Device\RsFx0320\<localmachine>\FILESTREAM_SHARE
Remark SQL Server FILESTREAM share
Maximum users unlimited
Users Caching Manual caching of documents
Permissions NT-AUTHORITY\Authenticated Users, FULL
The name is the name of the share you provide when initially configuring FILESTREAM in the SQL Server Configuration Manager. But what is it for?
So far
I read through all the available FILESTREAM documentation starting at:
- FILESTREAM (SQL Server)
- Enable and Configure FILESTREAM
- Create a FILESTREAM-Enabled Database
- Create a Table for Storing FILESTREAM Data
- ... and everything related
- FILESTREAM Compatibility with Other SQL Server Features
- FILESTREAM DDL, Functions, Stored Procedures, and Views
- Access FILESTREAM Data with OpenSqlFilestream
- the paper SQL Server 2008 - FILESTREAM Storage in SQL Server 2008
- and the article FILESTREAM (OLTP)---a Technical Reference Guide for Designing Mission-Critical OLTP Solutions which references a lot of other material
...but there was no mention of the share and what it does or what it is for. You enter the name and SQL Server will create the share under-the-hood.
FILESTREAM-enabled database
When you create a FILESTREAM-enabled database, the database references a filegroup which references a directory (recommended on a separate drive) that has absolutely nothing to do with the share, which was initially created during FILESTREAM configuration.
Screenshot FILESTREAM-enabled database script
Yes, I do realise that all paths are on C:; it is just an example
The white paper by Paul Randall et al. goes on to explaing that...
FILESTREAM data is stored in the file system in a set of NTFS directories called data containers, which correspond to special filegroups in the database. Transactional access to the FILESTREAM data is controlled by SQL Server and a file system filter driver that is installed as part of enabling FILESTREAM at the Windows level. The use of a file system filter driver also allows remote access to the FILESTREAM data through a UNC path. SQL Server maintains a link of sorts from table rows to the FILESTREAM files associated with them. This means that deleting or renaming any FILESTREAM files directly through the file system will result in database corruption.
... further down the document (page 14) they carry on with ...
There is a single FILESTREAM file system filter driver for each NTFS volume that has a FILESTREAM data container, and there is also one for each version of SQL Server that has a FILESTREAM data container on the volume. Each filter driver is responsible for managing all FILESTREAM data containers for that volume, for all instances that use a particular version of SQL Server.
For example, an NTFS volume that is hosting three FILESTREAM data containers, one for each of three SQL Server 2008 instances, will have only one SQL Server 2008 FILESTREAM file system filter driver.
Questions
- It's nice to know that SQL Server has everything nice and tied up, but what does that share actually do? Is it the so called "file system filter driver"?
- Seeing as any authenticated user can access the "share", what are the security implications?
- Is the Device RsFx0320 a predecessor to the resilient file system format that was introduced with Windows Server 2012?
If you can supply answers to my questions, then it would be nice if you could provide a source reference.