BT

SQL Server Denali’s FileTable: Turn SQL Tables into Folders

by Jenni Konrad on Jul 28, 2011 |

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.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT