SQL Server 中 varbinary(max) 中的最大实际空间 [英] Max real space in a varbinary(max) in SQL Server

查看:59
本文介绍了SQL Server 中 varbinary(max) 中的最大实际空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 varbinary(max) 在 SQL 表中保存文件(任何类型),我发现该数据类型的最大使用量为 8000,但 8000 是什么意思?

I am saving files (any type ) in a SQL table, using a varbinary(max), I find out that the max usage of this datatype is 8000, but what does the 8000 mean?

在线文档说这是 8000 字节.这是否意味着要保存的文件的最大大小为 8000/1024 = 7.8125 KB?

The online documentation says that is 8000 bytes. Does that mean that the maximum size of the file to be save there is 8000/1024 = 7.8125 KB?

我开始测试,我可以存储的最大文件是 29.9 MB.如果我选择更大的文件,则会出现 SQLException.

I start testing and the maximum file that I can store is 29.9 MB. If I choose a larger file a get a SQLException.

字符串或二进制数据将被截断.该声明已终止.

String or binary data would be truncated. The statement has been terminated.

推荐答案

在发布时实施 SQL Server 2012(代号 Denali) - 它具有 FileTable 功能 :)

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

  • varbinary(8000) 限制为 8000 字节 - 这是肯定的!
  • varbinary(max) 限制为 2 GB
  • varbinary(max) FILESTREAM 受文件系统限制(FAT32 - 2 Gb,NTFS - 16 艾字节)
  • 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)

这篇关于SQL Server 中 varbinary(max) 中的最大实际空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆