{"id":1100,"date":"2008-01-25T09:51:30","date_gmt":"2008-01-25T09:51:30","guid":{"rendered":"\/blogs\/paul\/post\/SQL-Server-2008-FILESTREAM.aspx"},"modified":"2008-01-25T09:51:30","modified_gmt":"2008-01-25T09:51:30","slug":"sql-server-2008-filestream","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/","title":{"rendered":"SQL Server 2008: FILESTREAM"},"content":{"rendered":"<p><FONT face=Verdana><FONT size=2><br \/>\n<P>Well it&#8217;s the end of our first week in China &#8211; tomorrow we fly to Beijing for another week of teaching. Hopefully we&#8217;ll get to do some sightseeing on Sunday &#8211; the last time I was in Beijing (for TechEd &#8217;06) the conference hotel was about 25 miles outside the city centre &#8211; so I haven&#8217;t <EM>really<\/EM> been to Beijing yet.<\/P><br \/>\n<P>During this week I&#8217;ve been playing with FILESTREAM for some demos I&#8217;m writing for a Microsoft class I&#8217;ll be&nbsp;teaching when I get back to Redmond. The class is about SQL Server 2008 for DBAs and the attendees will be a bunch of Microsoft Field personnel and SQL Server MVPs. Anyway, as I was playing, I realized that I hadn&#8217;t blogged anything about FILESTREAM yet, so this is the start of a series of posts about the feature. First up &#8211; what is it?<\/P><br \/>\n<P>One problem that SQL Server users face is how to store related structured and unstructured data (BLOBs)&nbsp;together while:<\/P><br \/>\n<UL><br \/>\n<LI>Providing a way to keep the data in sync (transactionally consistent)<br \/>\n<LI>Providing fast streaming access to the BLOBs<br \/>\n<LI>Keeping costs low<br \/>\n<LI>Enabling scalability<br \/>\n<LI>Providing ease of management<\/LI><\/UL><br \/>\n<P>There&#8217;s also been a strong desire for a data type that supports BLOB values greate than 2GB for many years.<\/P><br \/>\n<P>Before SQL Server 2008, the solutions centered around:<\/P><br \/>\n<OL><br \/>\n<LI>Storing the BLOBs in the file system<br \/>\n<UL><br \/>\n<LI>Advantages: low cost per GB; great streaming performance<br \/>\n<LI>Disadvantages: difficult to integrate with structured data; complex app development\/deployment<\/LI><\/UL><br \/>\n<LI>Storing the BLOBs on a dedicated BLOB store<br \/>\n<UL><br \/>\n<LI>Advantages: good scale\/expandability; cost decreases as scale increases<br \/>\n<LI>Disadvantages: difficult to integrate with structured data; complex app development\/deployment; streaming support\/performance is solution dependent<\/LI><\/UL><br \/>\n<LI>Storing the BLOBs in a database<br \/>\n<UL><br \/>\n<LI>Advantages: integrated management; BLOBs integrated with structured data; easy app development\/deployment<br \/>\n<LI>Disadvantages: high cost per GB; poor streaming performance; 2GB size limit per BLOB<\/LI><\/UL><\/LI><\/OL><br \/>\n<P>Enter FILESTREAM. It provides the following:<\/P><br \/>\n<UL><br \/>\n<LI>BLOB data is stored in the file system but rooted in the database (in the table of which it is part)<br \/>\n<LI>BLOB data is kept transactionally consistent with structured data<br \/>\n<LI>BLOB data is accessible through T-SQL <EM>and<\/EM> the NTFS Streaming APIs &#8211; with great streaming performance<br \/>\n<LI>BLOB size is limited only by the NTFS volume size<br \/>\n<LI>Manageability is integrated into SQL Server<\/LI><\/UL><br \/>\n<P>Sounds pretty good eh? Well, it is &#8211; mostly. There are a few drawbacks with v1 however:<\/P><br \/>\n<UL><br \/>\n<LI>Database mirroring cannot be configured on databases with FILESTEAM data<br \/>\n<LI>Database snapshots don&#8217;t snapshot FILESTEAM data<br \/>\n<LI>FILESTREAM data can&#8217;t be natively encrypted by SQL Server<\/LI><\/UL><br \/>\n<P>Personally, I think the first of these could be a major barrier to adoption in the enterprise &#8211; hopefully this restriction will be lifted in v2.<\/P><br \/>\n<P>So &#8211; there&#8217;s a taster. In the next few posts I&#8217;ll detail how to enable FILESTREAM and create FILESTREAM data.<\/P><\/FONT><\/FONT><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well it&#8217;s the end of our first week in China &#8211; tomorrow we fly to Beijing for another week of teaching. Hopefully we&#8217;ll get to do some sightseeing on Sunday &#8211; the last time I was in Beijing (for TechEd &#8217;06) the conference hotel was about 25 miles outside the city centre &#8211; so I [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,86],"tags":[],"class_list":["post-1100","post","type-post","status-publish","format-standard","hentry","category-filestream","category-sql-server-2008"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Server 2008: FILESTREAM - Paul S. Randal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2008: FILESTREAM - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"Well it&#8217;s the end of our first week in China &#8211; tomorrow we fly to Beijing for another week of teaching. Hopefully we&#8217;ll get to do some sightseeing on Sunday &#8211; the last time I was in Beijing (for TechEd &#8217;06) the conference hotel was about 25 miles outside the city centre &#8211; so I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2008-01-25T09:51:30+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/\",\"name\":\"SQL Server 2008: FILESTREAM - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2008-01-25T09:51:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2008: FILESTREAM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server 2008: FILESTREAM - Paul S. Randal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2008: FILESTREAM - Paul S. Randal","og_description":"Well it&#8217;s the end of our first week in China &#8211; tomorrow we fly to Beijing for another week of teaching. Hopefully we&#8217;ll get to do some sightseeing on Sunday &#8211; the last time I was in Beijing (for TechEd &#8217;06) the conference hotel was about 25 miles outside the city centre &#8211; so I [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/","og_site_name":"Paul S. Randal","article_published_time":"2008-01-25T09:51:30+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/","name":"SQL Server 2008: FILESTREAM - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2008-01-25T09:51:30+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-filestream\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2008: FILESTREAM"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/1100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=1100"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/1100\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=1100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=1100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=1100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}