17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 11: FileTableNon-transactional accessTransactional access to the BLOB data stored in a FileTable is supported like it is withany <strong>FILESTREAM</strong> column. <strong>The</strong> ability to access the files and folders in the FileTable usingtraditional Windows API-based applications requires that access is also allowed outsidethe bounds <strong>of</strong> a <strong>SQL</strong> <strong>Server</strong> transaction. Access to traditional <strong>FILESTREAM</strong> columns stillrequires a transaction context for reading and writing, even in <strong>SQL</strong> <strong>Server</strong> 2012, and thisis regardless <strong>of</strong> any database-level configuration for non-transactional access.This non-transactional access is configured at the database level, meaning that we canhave multiple databases on the same <strong>SQL</strong> <strong>Server</strong> instance with different configurationsfor non-transactional access <strong>of</strong> FileTables. <strong>The</strong> options for non-transacted access are:• Off – Non-transactional access to FileTables is not allowed; any access to the<strong>FILESTREAM</strong> data stored in all FileTables in the database follows the same rules asregular <strong>FILESTREAM</strong>.• ReadOnly – Non-transactional access to FileTable data is only possible for reading;client applications cannot create or modify files and folders unless they use traditional<strong>FILESTREAM</strong> techniques.• Full – Non-transactional access to FileTables is allowed for both reading and writing;client applications can open and save files and create folders using the standardWindows or .NET file I/O APIs.Internally, <strong>SQL</strong> <strong>Server</strong> will use the Read Committed transaction isolation level to enforcelocking or concurrency semantics.To configure non-transactional access using SSMS, open the Database Propertieswindow for the database in question, and in the Options page locate the <strong>FILESTREAM</strong>Non-Transacted Access option and select the appropriate value as shown in Figure 11-1.396

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!