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> FeaturesWhen creating a merge or transactional publication with updatable subscriptions, <strong>SQL</strong><strong>Server</strong> will automatically add a UNIQUEIDENTIFIER column, with a ROWGUIDCOLattribute if the table does not already have one. On <strong>FILESTREAM</strong> tables, <strong>SQL</strong> <strong>Server</strong> willuse the existing GUID column.When adding a <strong>FILESTREAM</strong> column to a table that is already published for mergeor transactional replication with updatable subscriptions, we don't need to add a newUINQUEIDENTIFIER column because the replication process will already have done sowhen the table was published for two-way replication. However, we must ensure that theUINQUEIDENTIFIER column has a UNIQUE constraint; if the column does not have aUNIQUE constraint, you need to add one before creating the <strong>FILESTREAM</strong> column onthe table.By default, merge replication and transactional replication are configured to replicateschema changes to the subscriber. If this setting is changed, the UNIQUE constraint willnot be replicated to the subscribers and an error will be raised when the <strong>FILESTREAM</strong>column is replicated.<strong>The</strong> current schema replication settings can be reviewed in the Subscription Optionspage <strong>of</strong> the Publication Properties dialog box: right-click on the publication and selectProperties, and then select the Subscription Options tab. <strong>The</strong> Schema Replicationsection is at the bottom <strong>of</strong> the property table (Figure 10-3).358

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

Saved successfully!

Ooh no, something went wrong!