when insert length of lob data to be replicated exceeds configured maximum 65536

不想你离开。 提交于 2019-12-21 04:40:15

问题


I am trying to insert a value into a column of datatype image in SQL Server. I am getting the following error:

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

The data length is less than 2 MB.

What is the problem?


回答1:


For SQL Server 2005 or earlier you can run:

sp_configure 'max text repl size', 2147483647

For SQL Server 2008 or later you can run:

sp_configure 'max text repl size', -1

The former increases the maximum size allowed, the latter essentially says "remove the limit". Once the maximum size is increased or removed, large LOBs will be able to be replicated.




回答2:


Don't forget to run RECONFIGURE after running sp_configure so that your changes can take effect




回答3:


As an alternative, you can configure the max text replication size option via SQL Server Management Studio

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

To configure the max text repl size option
1. In Object Explorer, right-click a server and select Properties.
2. Click the Advanced node.
3. Under Miscellaneous, change the Max Text Replication Size option to the desired value.

I've tested it in SQL Server 2012, but from the previous link you can view the instructions for 2005 and 2008 which are the same.



来源:https://stackoverflow.com/questions/925824/when-insert-length-of-lob-data-to-be-replicated-exceeds-configured-maximum-65536

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