We successfully migrated from sql 2005 to sql 2008 few weeks back (a non production environment) , there was little or no issues with the migration, I would consider this to be one of the items that went well for us as a DAB team for last quarter.
Few days back on of the dev folks walk up to me told me a transaction won’t get completed and the application is generating the following error.
Msg 7139, Level 16, State 1, Procedure csp_esccm_tTablename_Update, Line 49
Length of LOB data (72322) to be replicated exceeds configured maximum 65536.
The statement has been terminated.
After going through the message I noticed that the error was to do with replication and that the maximum row size is not supported with one of the current settings after the migarion.
Solution
There are server level setting that needs to be changed for replication to successfully transfer large data rows.
1. exec sp_configure 'max text repl size'
Highlight and execute the code on line one. This will display the maximum and the current sizes for the data row that can be replicated from publisher to subscriber in KB.
2. exec sp_configure 'max text repl size', 1024000
Then to overcome the current issue we can increase the size of the data that can be replicated. I have increased the max replication size from 64MB to 1 GB
3. RECONFIGURE WITH OVERRIDE
Then you execute the reconfigure with Override , this will assign the configure value to the current value immediately without having to restart sql server instance.
4. exec sp_configure 'max text repl size'
Verifying if the maximum replication setting has been successfully set
This change will solve the problem and let you proceed with replicating data as frequent you like.
Conclusion
- You need to know the size of data row or replication will fail.
- When large columns are replicated it would be required to set the 'max text repl size’ from its current value to the max size of the data row.
- We did forget to set the max replication setting after the migration to sql 2008
Few days back on of the dev folks walk up to me told me a transaction won’t get completed and the application is generating the following error.
Msg 7139, Level 16, State 1, Procedure csp_esccm_tTablename_Update, Line 49
Length of LOB data (72322) to be replicated exceeds configured maximum 65536.
The statement has been terminated.
After going through the message I noticed that the error was to do with replication and that the maximum row size is not supported with one of the current settings after the migarion.
Solution
There are server level setting that needs to be changed for replication to successfully transfer large data rows.
1. exec sp_configure 'max text repl size'
Highlight and execute the code on line one. This will display the maximum and the current sizes for the data row that can be replicated from publisher to subscriber in KB.
2. exec sp_configure 'max text repl size', 1024000
Then to overcome the current issue we can increase the size of the data that can be replicated. I have increased the max replication size from 64MB to 1 GB
3. RECONFIGURE WITH OVERRIDE
Then you execute the reconfigure with Override , this will assign the configure value to the current value immediately without having to restart sql server instance.
4. exec sp_configure 'max text repl size'
Verifying if the maximum replication setting has been successfully set
This change will solve the problem and let you proceed with replicating data as frequent you like.
Conclusion
- You need to know the size of data row or replication will fail.
- When large columns are replicated it would be required to set the 'max text repl size’ from its current value to the max size of the data row.
- We did forget to set the max replication setting after the migration to sql 2008
This was exactly what I was looking for. Thank you! :)
ReplyDelete