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> FeaturesListing 10-2 shows how to set this option to true using T-<strong>SQL</strong> for a merge publication.EXEC sp_changemergepublication@publication = 'northpole',@property = N'replicate_ddl',@value = 1,@force_invalidate_snapshot = 0,@force_reinit_subscription = 0;Listing 10-2:T-<strong>SQL</strong> script to update the replicate_ddl option <strong>of</strong> a publication.MSDN documentation says that, if a UNIQUE constraint has been added manually andyou wish to remove replication, the UNIQUE constraint should be removed first. If theUNIQUE constraint is not removed before attempting to drop the publication, the dropoperation will fail. I could not replicate this behavior during my testing, but keep this inmind while replicating <strong>FILESTREAM</strong> columns.Managing the <strong>FILESTREAM</strong> replication flag usingT-<strong>SQL</strong>In the previous section we learned that a <strong>FILESTREAM</strong> column can be replicatedwith or without the <strong>FILESTREAM</strong> attribute. <strong>The</strong>n we saw how to change theconfiguration to replicate the <strong>FILESTREAM</strong> attribute or disable the replication <strong>of</strong>the <strong>FILESTREAM</strong> attribute using the SSMS dialog boxes. Here, we examine how the<strong>FILESTREAM</strong> replication flag can be managed using T-<strong>SQL</strong>; in other words, how toenable and disable the replication <strong>of</strong> the <strong>FILESTREAM</strong> attribute using the replicationsystem stored procedures.360

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

Saved successfully!

Ooh no, something went wrong!