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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11: FileTableNow open (or return to) SSMS and select all rows from the Documents FileTable. Youwill find that one row is returned. You can verify the value <strong>of</strong> the name column to makesure the correct file is returned. Also note the value <strong>of</strong> the cached_file_size column,which should read 0 (as the file is empty). A full discussion <strong>of</strong> the FileTable schema isincluded above.It is possible that you set a value for the <strong>FILESTREAM</strong> Non-Transacted Access toReadOnly. In that case, you will not be able to create new files. Windows Explorer willshow an error message like the one in Figure 11-6.Figure 11-6:Windows Explorer error message if <strong>FILESTREAM</strong>Non-Transacted Access is set to ReadOnly.<strong>The</strong> error message states that destination folder access is denied, but there really isn't apermission issue. It may be more constructive to think about it as a configuration issue.If you successfully created the new text file, open it in your favorite text editor (which islikely not <strong>FILESTREAM</strong>-aware!) and add some text to the file. Use the Save command inyour text editor to save your changes. Rerun the SELECT query in SSMS and review theresults. You will find that the cached_file_size column has been updated to reflectthe new file size. Close the text editor.412

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

Saved successfully!

Ooh no, something went wrong!