Exception might be thrown while saving results to the reporting database if the data is too long


Description

If too long URLs or other string data are stored in the collection database, aggregation and saving the data to the reporting database might fail. This leads to slow aggregation and missing the data in the reporting database.

The following message can be found in the log files:

ERROR Exception when storing an aggregation result into reporting database. Item will be postponed and retried later.
Exception: System.Data.SqlClient.SqlException
Message: String or binary data would be truncated.

Solution

Download and install the patch compatible with the affected product version found on this page:
https://github.com/sitecoresupport/Sitecore.Support.97934/releases