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 3: Accessing <strong>FILESTREAM</strong> Data from Client Applications<strong>The</strong> example above shows the logical path to the <strong>FILESTREAM</strong> data inserted into theItems table using the script in Listing 3-27 on the author's computer. If you run the codeon your computer, you might see a slightly different result.Table 3-1 dissects the various different component parts <strong>of</strong> the logical path name <strong>of</strong> a<strong>FILESTREAM</strong> data file.\\localhost\MS<strong>SQL</strong>SERVERComputer name.<strong>FILESTREAM</strong> share name.<strong>FILESTREAM</strong> version number (used internally).\v1\NorthPole\dbo\Items\\ItemImage\E76D878F-0B2D-48EE-906E-58349797D6ECOn <strong>SQL</strong> <strong>Server</strong> 2008 and 2008 R2 the versionnumber shows up as "v1." On <strong>SQL</strong> <strong>Server</strong>2012, the version number shows up as "v02"which is part <strong>of</strong> a more complex value such as"v02-A60EC2F8-2B24-11DF-9CC3-AF2E56D89593."Fully qualified object name (Database\Schema\Table).Column name.File identifier. This is the value <strong>of</strong> the ROWGUIDCOL<strong>of</strong> the current row.VolumeHint-HarddiskVolume2 This additional value is seen only in <strong>SQL</strong> <strong>Server</strong> 2012.Table 3-1:<strong>The</strong> components <strong>of</strong> the logical path name.Note that the logical path name is useful only to <strong>SQL</strong> <strong>Server</strong>; you cannot reliably identifythe disk file using this information. <strong>SQL</strong> <strong>Server</strong> installs a filter driver which translates thelogical path name to the correct disk file when you try to access it using the streamingAPI functions.118

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

Saved successfully!

Ooh no, something went wrong!