Today, after attending a Session from Aasim Abdullah I have learned about FileTable, a new SQL Server 2012 feature based on FileStream. With FileTable, we can manage documents in a more professional way.
Filetable is to Store, Manage and Represents a Hierarchy of Files and
Directories with their General Meta data (10 file attributes) in special
tables of SQL server.
Filetable
NON_TRANSACTED_ACCESS, Windows API Compatibility allow files access from
windows explorer
Filetable is Fixed
structured table and allow only two options with table creation
1. Directory
2. Collation
SQL Server automatically creates fixed number of
triggers, indexes and constraints on table with the creation of 'Filetable'
|
|
Following are basic important figures of Filetable
Prerequisite for Filetable are
• Instance Level
• FILESTREAM enabled
• Database Level
• FILESTREAM Filegroup defined
• Non-transnational ( None, Read Only,
Read\Write) option enabled
• Valid directory (NTF Data Container)
specified
Methods to
load files in Filetable are
1. Copy-Paste in Windows Explorer
2. T-SQL
(Bulk Copy Operation)
Operations
that we can perform on Filetable are
• Insert
• Update
• Delete
•
User
defined indexes, triggers and constraints
Security:
• Filetable supports only SQL Server T-SQL
Level Security
File Table
DMVs are
• sys.database_filestream_options
• sys.filetables
• sys.filetable_system_defined_objects (System objects related to file table)
• sys.dm_tran_locks
Kill File
Handles for urgent
tasks are also allowed
EXEC
sp_kill_filestream_non_transacted_handles @table_name = 'filetable_name';
Limitations
• Memory-mapped files (like Notepad and Paint) are not supported with
NON_TRANSACTED_ACCESS, only way to get access to those files is remote access.
• Partition is not allowed on Filetable
• ‘Select Into’ statement can’t be used
for Filetable creation
• Up-to 15 levels Sub-Directory allowed
• Filetable ‘s File name limit doesn't match with Windows Explorer limit
Reference
Links
I have found following links more use full
and a video of Technet is more easy to understand File Tables.
http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2270
http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2270