Max real space in a varbinary(max) in SQL Server

∥☆過路亽.° 提交于 2019-11-29 03:42:37
Eddy

Implement SQL Server 2012 (codename Denali) when it's released - it has FileTable feature :)

  • varbinary(8000) is limited by 8000 bytes - that's for sure!
  • varbinary(max) is limited by 2 gigabytes
  • varbinary(max) FILESTREAM is limited by your file system (FAT32 - 2 Gb, NTFS - 16 exabytes)
Mikecito

Taken from here:

http://msdn.microsoft.com/en-us/library/ms188362.aspx:

max indicates that the maximum storage size is 2³¹-1 bytes

which is 2 147 483 647 bytes. I'm not sure why it stops at 29.9MB.

What version of SQL Server are you using?

Varbinary on MSDN for SQL Server 2008 explicitly says that VarBinary(MAX) is for use when "the column data entries exceed 8,000 bytes."

Also, I would also take a look at the Filestream Capabilities in SQL Server 2008 if that is the server you are using.

I got the "String or binary data would be truncated" error when trying to store 5MB using varbinary(max) on SQL Server 2005. Increasing the autogrowth size for the database solved the problem. Took me a while to figure out, so just thought I'd share :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!