

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".

Use the stored procedure sp_configure to increase the configured maximum value for max text repl size option, which defaults to 65536. Sometimes When we do a DML operation in SQL Server, we end up with the below error – “Length of LOB data to be replicated exceeds configured maximum 65536. Per MSDN: The max text repl size option specifies the maximum size (in bytes) of text, ntext, varchar (max), nvarchar (max), varbinary (max), xml, and image data that can be added to a replicated column or captured column in a single INSERT, UPDATE, WRITETEXT, or UPDATETEXT statement. Carefully choosing the best possible value for this configuration setting fixed the problem. The default value is 65536 bytes.Īs this column was part of transactional replication the value of Max Text Replication Size came into picture and anything above 65536 bytes on a single Insert was not allowed and Citrix faced issues while publishing new apps. The max text repl size option specifies the maximum size (in bytes) of text, ntext, varchar (max), nvarchar (max), varbinary (max), xml, and image data that can be added to a replicated column or captured column in a single INSERT, UPDATE, WRITETEXT, or UPDATETEXT statement.
