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 10: Integrating <strong>FILESTREAM</strong> with other <strong>SQL</strong> <strong>Server</strong> Featureswith the modified value. <strong>The</strong> old file stays around in the <strong>FILESTREAM</strong> data containeruntil the garbage collector steps in and deletes it.Every <strong>FILESTREAM</strong> operation is linked to an LSN in the database transaction log. <strong>The</strong>garbage collector will remove a file marked for garbage collection only when the transactionlog is truncated past the LSN that created the <strong>FILESTREAM</strong> garbage file.When a <strong>FILESTREAM</strong> database is published, the transaction log cannot be truncated untilthe replication log reader agent reads the information from the transaction log. This candelay the <strong>FILESTREAM</strong> garbage collection, because the garbage collector cannot deletethe files until the transaction log is truncated.It is therefore possible that you will notice <strong>FILESTREAM</strong> garbage files lying around for alonger period if the <strong>FILESTREAM</strong> columns are replicated and the replication log readeragent does not run frequently.<strong>FILESTREAM</strong> and synchronization methodsIt is important to note that, if a publication includes tables having <strong>FILESTREAM</strong> columns,the snapshot synchronization methods <strong>of</strong>fered by <strong>SQL</strong> <strong>Server</strong> Enterprise Edition cannotbe used.<strong>SQL</strong> <strong>Server</strong> Enterprise Edition provides two efficient synchronization methods forbuilding the replication snapshot, namely database snapshot and database snapshotcharacter, which generates the snapshot based on a database snapshot, resulting in nolocks being applied on the tables when the replication snapshot is being created. Databasesnapshots cannot include <strong>FILESTREAM</strong> filegroups (explained later in this chapter) andtherefore, if the publication includes <strong>FILESTREAM</strong> columns, snapshot synchronizationmethods are not supported.366

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

Saved successfully!

Ooh no, something went wrong!