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.

Appendix A: Configuring <strong>FILESTREAM</strong> on a <strong>SQL</strong> <strong>Server</strong> InstanceUntil the instance is restarted, the <strong>FILESTREAM</strong>-enabled databases can be queried usingT-<strong>SQL</strong> (both relational and <strong>FILESTREAM</strong> data), but no longer using the streaming APIs.Access using the streaming APIs is disabled immediately because the file share is removed.<strong>The</strong> restart is required because <strong>SQL</strong> <strong>Server</strong> has to take <strong>of</strong>fline any <strong>FILESTREAM</strong>-enableddatabases on the instance. Following the service restart, any <strong>FILESTREAM</strong>-enableddatabases will not be accessible. You will be able to see the databases in the SSMS ObjectExplorer (Figure A-16), but you will not be able to establish a connection to them.Figure A-17:Inaccessible <strong>FILESTREAM</strong>-enabled database in Object Explorer.If we now try to run a query on a <strong>FILESTREAM</strong>-enabled database, we will get an errorsimilar to the one shown in Listing A-4.SELECT *FROM NorthPole.dbo.items/*Msg 945, Level 14, State 2, Line 1Database 'NorthPole' cannot be opened due to inaccessiblefiles or insufficient memory or disk space.See the <strong>SQL</strong> <strong>Server</strong> errorlog for details.*/Listing A-4:Error message showing <strong>FILESTREAM</strong>-enabled database is inaccessible.480

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

Saved successfully!

Ooh no, something went wrong!