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: FileTableEmpty database folderIf a user account has only been granted select, insert, update and/or delete permission onthe FileTables in a database, the shared folder for that database will appear empty whenbrowsing to it. When typing in the name <strong>of</strong> the folder associated with a FileTable, you cannavigate further.As an example, consider John, who has been given select permission only on the FileTablein the database NorthPole on the server <strong>SQL</strong>01. (Assume the <strong>FILESTREAM</strong> directoryname and the FileTable directory name are the same as the database and table names).When John uses Windows Explorer to navigate to the database's folder at \\<strong>SQL</strong>01\MS<strong>SQL</strong>SERVER\NorthPole, the folder will appear empty.By appending the folder name to the path \\<strong>SQL</strong>01\MS<strong>SQL</strong>SERVER\NorthPole\DocumentStore, John will have access to the FileTable.This symptom is caused by the fact that the user was not granted the Viewdefinition permission on the FileTable. <strong>The</strong> commonly used built-in database rolesdb_datareader and db_datawriter are also not granted those permissions.So, in order for your users to have a fluent experience while accessing FileTable shares,they should be given the View definition permission.Programming FileTableIn this section, we'll cover how to read and update FileTable data using application code.We'll use both T-<strong>SQL</strong> and the .NET file I/O APIs to read, create, modify, and delete filesand folders in a FileTable.414

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

Saved successfully!

Ooh no, something went wrong!