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 10: Integrating <strong>FILESTREAM</strong> with other <strong>SQL</strong> <strong>Server</strong> FeaturesIn most cases, it will be tedious to selectively exclude the <strong>FILESTREAM</strong> columns whilequerying a database snapshot. It would have been much easier if <strong>SQL</strong> <strong>Server</strong> simplyreturned NULL for the <strong>FILESTREAM</strong> columns instead <strong>of</strong> raising an error, but it is possiblethat this was not done because one <strong>of</strong> the main features <strong>of</strong> the <strong>FILESTREAM</strong> storage isthe transactional consistency between the relational data and <strong>FILESTREAM</strong> data.<strong>FILESTREAM</strong> and Change Data CaptureChange Data Capture (CDC) was introduced with <strong>SQL</strong> <strong>Server</strong> 2008. When this featureis enabled, <strong>SQL</strong> <strong>Server</strong> keeps track <strong>of</strong> the modifications (inserts, updates, and deletions)on the tables being tracked. <strong>The</strong> data capture takes place asynchronously (by reading thetransaction log), which eliminates the additional overhead you may have with a triggerbasedcustom data capture framework. CDC can be configured to capture data modificationsat the table level as well as at the column level.More on CDCFor a more detailed discussion <strong>of</strong> CDC, see the Micros<strong>of</strong>t article, Tuning the Performance <strong>of</strong> Change DataCapture in <strong>SQL</strong> <strong>Server</strong> 2008 at: http://brurl.com/fs25.Books Online states that CDC does not support any <strong>of</strong> the new data types introduced in<strong>SQL</strong> <strong>Server</strong> 2008. If you decide to enable CDC on your <strong>FILESTREAM</strong>-enabled tables, youmust exclude the <strong>FILESTREAM</strong> columns from the capture list.So what happens if you enable CDC on a table that contains <strong>FILESTREAM</strong> columns?CDC will capture those columns as VARBINARY(MAX) columns.377

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

Saved successfully!

Ooh no, something went wrong!