BT

Your opinion matters! Please fill in the InfoQ Survey!

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

| by Jenni Konrad Follow 0 Followers on Jul 28, 2011. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login 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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT