Quantcast
Channel: Aneef.Net » SQL
Viewing all articles
Browse latest Browse all 7

The FILESTREAM Data Type in SQL Server 2008

$
0
0

Seriously, i’ve no time these days for blogging, busy with work as well as personal activities. but just wanted to share this valuable information for those who might have missed.

Well the current project which im working on is the ASSETTE Presentations. for more information on the project you can see the above link. but the project uses alot of binary data transfered back and forth to the server and the client thorugh our web services, and most of these binary files are stored in SQL Server 2005 Database. storing binary files inside the database really slows down retrieval of the files when we need them and there are several other desadvantages also. specially  rapidly growing size of the database,taking backups, and maintainance of the database. 

But now with SQL Server 2008 we have a new data type called FILESTREAM , to solve all the above issues.

 

What is FILESTREAM?

FILESTREAM is a new datatype in SQL SERVER 2008. To use FILESTREAM, a database needs to contain a FILESTREAM filegroup and a table which contains a varbinary(max) column with the FILESTREAM attribute set. This causes the Database Engine to store all data for that column in the file system, but not in the database file. A FILESTREAM filegroup is a special folder that contains file system directories known as data containers. These data containers are the interface between Database Engine storage and file system storage through which files in these data containers are maintained by Database Engine.

What FILESTREAM does?

By creating a FILESTREAM filegroup and setting a FILESTREAM attribute on the column of a table, a data container is created which will take care of DML statements.

FILESTREAM will use Windows API for streaming the files so that files can be accessed faster. Also instead of using SQL SERVER cache it will use Windows cache for caching the files accessed.

When you use FILESTREAM storage, consider the following:

  • When a table contains a FILESTREAM column, each row must have a unique row ID.
  • FILESTREAM data containers cannot be nested.
  • When you are using failover clustering, the FILESTREAM filegroups must be on shared disk resources.
  • FILESTREAM filegroups can be on compressed volumes.
For more information on how to use FILESTREAM and to have a in depth knowladge about it please refer the below article in SQLSERVERCENTRAL. its well written and gives you a clear idea on what it is.
By Deepa Gheewala, 2008/09/24
and here is another blog post on the same topic in MSDN Blogs.
Hope It helps!.

 

 


Viewing all articles
Browse latest Browse all 7

Trending Articles