SQL Server Denali’s FileTable: Turn SQL Tables into Folders
SQL Server 2011 (code name "Denali") includes a new type of table called FileTable, which builds on FileStream functionality. FileTable is meant for storing and managing unstructured data in SQL Server, while also making it accessible via the file system.
In order to use FileTables, an administrator must enable non-transactional access to the database. (Microsoft states that this will have no effect on existing FileStream operations.) Once this is enabled, creating a FileTable is straightforward; it requires only a name and the location of the directory for the file store.
CREATE TABLE DocumentStore AS FileTable WITH ( FileTable_Directory = 'DocumentTable', FileTable_Collate_Filename = database_default ); GO
Users can then access the FileTable folder via Windows Explorer, and drag and drop files to add them to the database. The FileTable stores the name and type of the file, the path, language, and creation and modification dates in addition to other status information. It also maintains the entire folder structure starting from the root directory. Though FileTable folders behave as any other Windows directory, the physical files are actually stored in SQL Server, not the file system.
Files can be bulk-loaded, updated, and managed directly using Transact-SQL; SQL Management Tools like auditing and backup are also supported.
Camille Fournier May 21, 2015