1

I've inherited a system which originally started as a small document management system but recently large files have started to be uploaded and the request is to have files up to 3gb stored in our DB

The DB is MS SQL Server 2008 R2 and the content is stored as binary in a 'VARBINARY(MAX)' column. Currently we split any upload into 10mb chunks to help manage large files.

I've had a look at the Microsoft help files and it appears the max you can store in a Varbinary column is 2gb (http://msdn.microsoft.com/en-us/library/ms188362.aspx). I for some reason thought this was on SQL Server 2005 and below only, but it appears to be a limit on all versions as far as I can see.

I know this isn't an efficient way to store large data but its not possible (short term at least) to change. Have I any options other than maybe splitting the file?

Many thanks

MikeS
  • 647
  • 5
  • 18
  • 4
    [Store them in the file system instead?](http://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay) – mellamokb Nov 07 '13 at 16:04
  • This doesn't look like it's really a C# or ASP.NET question at all - it sounds like it's really about SQL Server. – Jon Skeet Nov 07 '13 at 16:04
  • 2
    Look at `FILESTREAM` if 2008+. [The sizes of the BLOBs are limited only by the volume size of the file system. The standard varbinary(max) limitation of 2-GB file sizes does not apply to BLOBs that are stored in the file system.](http://technet.microsoft.com/en-us/library/bb933993(v=sql.105).aspx) – Martin Smith Nov 07 '13 at 16:05
  • @JonSkeet I've removed the tags, thought it may have been applicable if other people had come across this type of issue in ASP.NET applications – MikeS Nov 07 '13 at 16:08

0 Answers0