﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Discuss content posted by Deepa Parikh / Article Discussions by Author  / The FILESTREAM Data Type in SQL Server 2008 / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 20:01:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Great article!  Have a question for you...  Can I attach a file saved on a Filestream column to an email sent with sp_send_dbmail?Any insight will be greatly appreciated!-M</description><pubDate>Tue, 02 Apr 2013 15:56:40 GMT</pubDate><dc:creator>maria.rivera</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Can I use queries with FREETEXT, CONTAINS, NEAR etc. with data(content of text files or doc files) stored using sql filestream?</description><pubDate>Sun, 23 Oct 2011 23:46:09 GMT</pubDate><dc:creator>jain.robin15</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Excellent article! Very well written and most of the advice in the comments are spot on.I have a slightly off-topic question. We are currently still on SQL Server 2005. We will not move to SQL Server 2008 until at least Q2 2009.I have to implement a system on SQL Server 2005 that basically mimics a document management system. Do I save the BLOBs to a MAX field in the database or do I save the BLOB to the File System? Which method will be the easiest/less work to convert to FILESTREAM?Thank you in advance.</description><pubDate>Thu, 06 Nov 2008 13:56:15 GMT</pubDate><dc:creator>dawidjordaan</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Yes, it really gets down to understanding both the requirements and the tools.I see many troubled/problem applications/systems where lack of storage knowledge was the biggest problem with the system.  Storage being both database and overall file system.</description><pubDate>Thu, 25 Sep 2008 06:57:41 GMT</pubDate><dc:creator>Andrew Peterson-472853</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Andrew:I agree with you that from a performance standpoint, storing these files in the native file system is the better option.But then, data recoverability is an issue. I had worked on a project that managed cases in XML and the XML files were stored in Documentum. We had to minimize data loss (once-a-day backup was not acceptable) and you had buy a pricey third-party software to ensure that data loss was restricted to 15 minutes in case of data corruption/system outage etc.Venki</description><pubDate>Thu, 25 Sep 2008 06:36:37 GMT</pubDate><dc:creator>the_rs</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Designers of document storage and mgmt apps (with large document objects) had to decide where to store the objects.  These included document management systems like LiveLink, and more recentlySharepointt. As internet bandwidth increases, applications that use large files are expanding, including video and music files. LiveLink, as a document management system supported both (either) the storing of documents in the database as blobs, or in external files.   As some of the earlier comments noted, large blobs were slow, so most installations used external files.  That allowed the database, which then only held meta-data, be be fairly small, fast, and to only require a modest server.  Naturally, maintaining the correct linkage between the external files and the internal database records added some additional overhead.  But not really any more than the double-linked system the database engine uses to maintain page consistency.Filestream gives you an option, but like all options, only use it if it makes sense, and meets the business objectives.  My guess is that for many cases, storing files completely outside of the database (the current approach), and only storing the metadata in the database will tend to be the best approach.</description><pubDate>Thu, 25 Sep 2008 06:16:52 GMT</pubDate><dc:creator>Andrew Peterson-472853</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>SQL SERVER has provided a way to handle files and backup - recovery problems.Also it is recommended that this should be used when file size is above 1 MB.</description><pubDate>Thu, 25 Sep 2008 00:45:45 GMT</pubDate><dc:creator>Deepa Gheewala</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Yes.For larger blobs it's more efficient to use the GetPath() and Open SqlFilestream() functions to get an open file handle and use that to access the data under SQL control.  For smaller blobs the overhead of opening and closing the file overwhelms the faster data transfer.</description><pubDate>Wed, 24 Sep 2008 12:50:29 GMT</pubDate><dc:creator>Kevin Farlee</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>[quote][b]Kevin Farlee (9/24/2008)[/b][hr]We have done extensive perf testing.  Generally for blobs under 256K to 1 MB it's quicker to access via TSQL.  For larger blobs it's quicker to access the file directly.[snip]The files can only be accessed via SQL functions, and under the control of SQL Server.  There is a filter driver which verifies that the identity attempting the open has access to that cell in the database.  Also, the access happens in the context of the current SQL transaction.[/quote]Hi Kevin,Thanks for responding. One more point of clarification if you don't mind.When you say "For larger blobs it's quicker to access the file directly" does that mean "For larger blobs it's quicker to access the file directly via SQL functions, and under the control of SQL Server" (presumably using "column.GETPATH()" and "OpenSqlFilestream")?Thanks again,ScottEdit: I think your previous post answers my question.</description><pubDate>Wed, 24 Sep 2008 12:45:12 GMT</pubDate><dc:creator>Scott Roberts-430649</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>[quote][b]the_rs (9/24/2008)[/b][hr]Kevin:Is Deepa's statement true that if somebody accesses/modifies the file bypassing SQL Server, it may render the file corrupt?venki[/quote]First, re-read my post about direct file access.  It is ONLY allowed under the control of SQL Server.  So nobody can access the file outside of SQL's control.  Changes are logged and can be rolled back before you commit the transaction, even after you close the file handle.  If someone has legitimate access to that cell in the database, and is putting a new value in the FILESTREAM column, then you get whatever they put in, EXACTLY THE SAME as if they put that same value in a Varbinary(max) column.  The main difference is that now after you pass the SQL security checks, you can get the data into the column much more efficiently using the file handle.Kevin</description><pubDate>Wed, 24 Sep 2008 12:28:10 GMT</pubDate><dc:creator>Kevin Farlee</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>[quote][b]Scott Roberts (9/24/2008)[/b][hr]Nice article, but I have a couple of questions/suggestions:1. Are there any tests demonstrating the performance difference between FILESTREAM and traditional VARBINARY(MAX) columns? I've seen mention of varbinary being cumbersome in SQL2000 and older, but I was under the impression that it was much better in SQL2005.We have done extensive perf testing.  Generally for blobs under 256K to 1 MB it's quicker to access via TSQL.  For larger blobs it's quicker to access the file directly.2. Files can be accessed through the file system, but is this recommended? For example, would it be acceptable for a web site to directly access FILESTREAM files on the file system? Or are they just there in case someone wants to manually eye-ball one of them?The files can only be accessed via SQL functions, and under the control of SQL Server.  There is a filter driver which verifies that the identity attempting the open has access to that cell in the database.  Also, the access happens in the context of the current SQL transaction.3. How can I convert existing varbinary(max) columns to use FILESTREAM? Will a simple ALTER TABLE do it?No.  Since it requires moving all of the data, you need to ALTER TABLE ADD COLUMN, copy the data, and then delete the old column.4. What is the *PRIMARY* motivation for FILESTREAM? Is it for performance, or for accessing DB files from the file system?Performance for accessing large blobs of data (think streaming video out of the DB)Thanks again for taking the time to write the article. It was very informative and obviously got me thinking.Scott[/quote]</description><pubDate>Wed, 24 Sep 2008 12:23:09 GMT</pubDate><dc:creator>Kevin Farlee</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Kevin:Is Deepa's statement true that if somebody accesses/modifies the file bypassing SQL Server, it may render the file corrupt?venki</description><pubDate>Wed, 24 Sep 2008 12:22:20 GMT</pubDate><dc:creator>the_rs</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Good article, but a couple of clarifications are in order:First, FILESTREAM is a storage attribute on a varbinary(max) datatype column.  It is not a new datatype.  Seems like a trivial difference, but it has important implications.  Primarily, client code doesn't have to know anything about FILESTREAM.  to a TSQL client, it's just another varbinary(max) column.  The ONLY difference a client would notice is that the blobs can exceed 2GB.Second, there is a supported way to access the individual files UNDER SQL CONTROL.  Using the column.GETPATH() function, you get a logical path (not in the physical filesystem) which you use to open the file by calling OpenSqlFilestream.  This gets you an open file handle which is enlisted into the current SQL transaction.  Any modifications are done as part of that transaction, triggers fire when you close the file, etc.The physical files are ACLd to the SQL service account only, so unless you're running as that account, or you are a box admin walking on file security, you can't access the files outside of SQL control.</description><pubDate>Wed, 24 Sep 2008 12:13:00 GMT</pubDate><dc:creator>Kevin Farlee</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>If that be the case, why would SQL Server permit me to access the file through the OS?I would then not be inclined to use this feature, particularly since it will corrupt my database.</description><pubDate>Wed, 24 Sep 2008 12:08:45 GMT</pubDate><dc:creator>the_rs</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Hi,Interesting topic and well written.For those who are wondering about achieving the same functionality in SQL Server 2005, it should be possible to use using .NET CLR programming (like writing file handling code in .NET). Never tried, but i guess it should be possible.Vasant.</description><pubDate>Wed, 24 Sep 2008 11:41:47 GMT</pubDate><dc:creator>Vasant Raj</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>What are the advantages of FILESTREAM over the old NTEXT datatype?  NTEXT could also be stored in a separate datafile, backed up with SQL Backup, etc.</description><pubDate>Wed, 24 Sep 2008 09:08:09 GMT</pubDate><dc:creator>tfeldman</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Nice article, but I have a couple of questions/suggestions:1. Are there any tests demonstrating the performance difference between FILESTREAM and traditional VARBINARY(MAX) columns? I've seen mention of varbinary being cumbersome in SQL2000 and older, but I was under the impression that it was much better in SQL2005.2. Files can be accessed through the file system, but is this recommended? For example, would it be acceptable for a web site to directly access FILESTREAM files on the file system? Or are they just there in case someone wants to manually eye-ball one of them?3. How can I convert existing varbinary(max) columns to use FILESTREAM? Will a simple ALTER TABLE do it?4. What is the *PRIMARY* motivation for FILESTREAM? Is it for performance, or for accessing DB files from the file system?Thanks again for taking the time to write the article. It was very informative and obviously got me thinking.Scott</description><pubDate>Wed, 24 Sep 2008 09:06:51 GMT</pubDate><dc:creator>Scott Roberts-430649</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Yes, files can be accessed from the file system.But if you modify they might get corrupt &amp; then SQL server might have problem in accessing them.</description><pubDate>Wed, 24 Sep 2008 07:30:07 GMT</pubDate><dc:creator>Deepa Gheewala</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Deepa:Thank you for shedding light on this new data type.Can the file be accessed directly from the OS bypassing SQL Server?Venki</description><pubDate>Wed, 24 Sep 2008 07:25:42 GMT</pubDate><dc:creator>the_rs</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>[quote][b]samarjit2k1 (9/24/2008)[/b][hr]Can the [u]FILESTREAM data type[/u] be used in SQL Server [b]2005[/b]?[/quote]No just in SQL 2008 :P</description><pubDate>Wed, 24 Sep 2008 07:09:51 GMT</pubDate><dc:creator>Dugi</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Filestream is only in 2008.</description><pubDate>Wed, 24 Sep 2008 06:11:52 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>must say very usefull feature of 2k8.nicely explained..:)</description><pubDate>Wed, 24 Sep 2008 06:05:19 GMT</pubDate><dc:creator>krimish p shah</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Can the [u]FILESTREAM data type[/u] be used in SQL Server [b]2005[/b]?</description><pubDate>Wed, 24 Sep 2008 03:36:09 GMT</pubDate><dc:creator>samarjit2k1</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>This is a very usefull artical and I really want to know more about FILESTREAM. just wondering will this files should be on the same server where the SQL is installed? or can it be on a different FileServers?</description><pubDate>Wed, 24 Sep 2008 02:46:33 GMT</pubDate><dc:creator>Damian-167372</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Nice information about FILESTREAM!:cool:</description><pubDate>Wed, 24 Sep 2008 02:21:21 GMT</pubDate><dc:creator>Dugi</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Good article. A good concept which will help us to solve lot of problems. I have to explore more for advantages and disadvantages.</description><pubDate>Wed, 24 Sep 2008 01:42:48 GMT</pubDate><dc:creator>Anipaul</dc:creator></item><item><title>RE: The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Well written.</description><pubDate>Wed, 24 Sep 2008 01:41:51 GMT</pubDate><dc:creator>Santanu Sen</dc:creator></item><item><title>The FILESTREAM Data Type in SQL Server 2008</title><link>http://www.sqlservercentral.com/Forums/Topic574903-538-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/SQL+Server+2008/64088/"&gt;The FILESTREAM Data Type in SQL Server 2008&lt;/A&gt;[/B]</description><pubDate>Tue, 23 Sep 2008 23:37:50 GMT</pubDate><dc:creator>Deepa Gheewala</dc:creator></item></channel></rss>