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> FeaturesA warning on enabling CDC on <strong>FILESTREAM</strong> columns!It may affect the performance <strong>of</strong> the system. In addition, it is an unsupported operation and you mightend up with a number <strong>of</strong> problems, for example, large-value type columns may generate a huge volume <strong>of</strong>change data if those columns are frequently inserted/updated/deleted.However, it will be interesting to see what happens when CDC is enabled on a<strong>FILESTREAM</strong> column. To start with, let us create a <strong>FILESTREAM</strong>-enabled database(Listing 10-19).USE masterGOIF DB_ID('NorthPole') IS NOT NULLDROP DATABASE NorthPoleGOCREATE DATABASE NorthPole ON PRIMARY (NAME = NorthPole,FILENAME = 'C:\<strong>Art</strong>OfFS\Demos\Chapter10\NorthPole.mdf'), FILEGROUP NorthPole_fs CONTAINS <strong>FILESTREAM</strong>(NAME = NorthPole_fs,FILENAME = 'C:\<strong>Art</strong>OfFS\Demos\Chapter10\NorthPole_fs') LOG ON (NAME = NorthPole_log,FILENAME = 'C:\<strong>Art</strong>OfFS\Demos\Chapter10\NorthPole_log.ldf')GOUSE NorthPoleGOCREATE TABLE [dbo].[Items]([ItemID] UNIQUEIDENTIFIER ROWGUIDCOLNOT NULLUNIQUE ,[ItemNumber] VARCHAR(20) ,[ItemDescription] VARCHAR(50) ,[ItemImage] VARBINARY(MAX) <strong>FILESTREAM</strong>NULL)378

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

Saved successfully!

Ooh no, something went wrong!