sql-server - 我收到此错误 : Cannot create a row of size 8785 which is greater than the allowable maximum of 8060

标签 sql-server

在大多数情况下,这是由于某些特定记录的总行大小可能引发此类错误。但我的情况有所不同。我在一台服务器上运行报告,效果很好。但相同的报表和相同的数据库会抛出行大小错误:无法创建大小为 8785 的行,该行大小大于允许的最大值 8060。 关于如何解决这个问题有什么建议吗?

最佳答案

来自http://blogs.msdn.com/b/msdnts/archive/2006/12/01/row-size-limitation-in-sql-2000-and-2005.aspx :

When you creating a table, you may encounter the following information: ' Table has been created but its maximum row size(11038) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE Of a row in this table will fail if the resulting row length exceeds 8060 bytes.

报告中的某些内容第二次达到了这个最大值;可能是您没有发现的边缘情况,其中数据存在差异。

我建议您查看数据库字段的分配情况 - 例如,varchar(8000) 实际上是否可以切换为 varchar(max) - 或者考虑跨多个表重组数据。

关于sql-server - 我收到此错误 : Cannot create a row of size 8785 which is greater than the allowable maximum of 8060,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17598393/

相关文章:

sql - 排除多个条件的SQL查询结果-单表

c# - 使用for循环将多条记录插入SQL Server数据库

java - 在Java中执行用户定义的SQL Server函数

sql-server - 如何将数据表参数传递给存储过程sql server?

sql - 根据自动增量列插入列值

sql-server - 如何自动递增 varchar?

sql - 在 sql server 中将字符串连接到 Int。-但出现错误

sql - TFS 2017 如何使用 SQL 查询工作项

sql - 在变量中使用连字符

python - pyodbc.OperationalError : ('HYT00' , u'[HYT00] [unixODBC][Microsoft][SQL Server 的 ODBC 驱动程序 13] 登录超时已过期 (0) (SQLDriverConnect)')