Length of LOB data exceeds maximum 65536

简介:

报错:

Exception: Message: ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException: 

Length of LOB data (115388) to be replicated exceeds configured maximum 65536.  
The statement has been terminated


原因:   
是该数据库启动了SQL Server复制,而你尝试插入数据到一个配置了复制的文章的发布列text、ntext或image。


解决方法:   
为了解决该错误,先给该数据库做个完备,然后运行一下语句:    

1
2
3
4
sp_configure  'max text repl size' , 2147483647     
  Go     
  RECONFIGURE    
  GO

注意:该设置立即生效无需重启SQL Server服务。


更多信息:   
“max text repl size”选项以字节为单位,指定了text、ntext、varchar(max)、nvarchar(max)、varbinary(max)、xml和image类型数据,可以以单一的INSERT、UPDATE、WRITETEXT或UPDATETEXT语句添加到被复制的列,或者被捕获的列。默认大小为65536。该值为-1表明没有限制,而无论数据类型。该选项适用于事务复制和变更数据捕获。当一个实例既配置了事务复制又配置了变更数据捕获,该值对两个特性都适用。该选项不适用于快照复制和合并复制。


参考:   
SQL Server 2008中的Max text repl size选项:    
http://msdn.microsoft.com/en-us/library/ms186225.aspx














本文转自UltraSQL51CTO博客,原文链接:http://blog.51cto.com/ultrasql/1949629 ,如需转载请自行联系原作者




相关文章
|
6月前
|
Java 应用服务中间件
【异常】The field file exceeds its maximum permitted size of 1048576 bytes.
【异常】The field file exceeds its maximum permitted size of 1048576 bytes.
64 0
|
4月前
|
关系型数据库 MySQL
MySQL【问题 02】报错 1709 - Index column size too large. The maximum column size is 767 bytes. 可能是最简单的方法
MySQL【问题 02】报错 1709 - Index column size too large. The maximum column size is 767 bytes. 可能是最简单的方法
53 0
|
8月前
|
Java Spring
The field file exceeds its maximum permitted size of 1048576 bytes 文件上传大小受到限制,报错!!
The field file exceeds its maximum permitted size of 1048576 bytes 文件上传大小受到限制,报错!!
94 0
|
Java 应用服务中间件
The field file exceeds its maximum permitted size of 1048576 bytes.
The field file exceeds its maximum permitted size of 1048576 bytes.
|
算法
LeetCode 321. Create Maximum Number
给定长度分别为 m 和 n 的两个数组,其元素由 0-9 构成,表示两个自然数各位上的数字。现在从这两个数组中选出 k (k <= m + n) 个数字拼接成一个新的数,要求从同一个数组中取出的数字保持其在原数组中的相对顺序。 求满足该条件的最大数。结果返回一个表示该最大数的长度为 k 的数组。
50 0
LeetCode 321. Create Maximum Number
|
前端开发 Java 关系型数据库
记录:The field files exceeds its maximum permitted size of 1048576 bytes...【亲测有效】
记录:The field files exceeds its maximum permitted size of 1048576 bytes...【亲测有效】
1042 0
|
Java 索引 iOS开发
OutOfMemoryError系列(7): Requested array size exceeds VM limit
这是本系列的第七篇文章, 相关文章列表: OutOfMemoryError系列(1): Java heap space OutOfMemoryError系列(2): GC overhead limit exceeded OutOfMemoryError系列(3): Perm...
2896 0