Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

The FILESTREAM Data Type in SQL Server 2008 Expand / Collapse
Author
Message
Posted Wednesday, September 24, 2008 12:50 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, November 6, 2008 2:12 PM
Points: 10, Visits: 14
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.




Kevin Farlee
SQL Server Storage Engine PM
Post #575516
Posted Thursday, September 25, 2008 12:45 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, December 3, 2010 3:56 AM
Points: 124, Visits: 91
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.

Post #575739
Posted Thursday, September 25, 2008 6:16 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:19 AM
Points: 162, Visits: 319
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.


The more you are prepared, the less you need it.
Post #575889
Posted Thursday, September 25, 2008 6:36 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, November 6, 2008 6:16 PM
Points: 10, Visits: 20
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
Post #575911
Posted Thursday, September 25, 2008 6:57 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:19 AM
Points: 162, Visits: 319
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.



The more you are prepared, the less you need it.
Post #575932
Posted Thursday, November 6, 2008 1:56 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 5:43 PM
Points: 10, Visits: 434
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.
Post #598541
Posted Sunday, October 23, 2011 11:46 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, October 24, 2011 12:39 AM
Points: 1, Visits: 4
Can I use queries with FREETEXT, CONTAINS, NEAR etc. with data(content of text files or doc files) stored using sql filestream?
Post #1195025
Posted Tuesday, April 2, 2013 3:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 4, 2013 11:39 AM
Points: 2, Visits: 22
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
Post #1438122
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse