Wednesday, March 12, 2014

SQL Error: String or Binary data would be truncated

Issue: SQL error during Insertion of records to a custom table
"String or Binary data would be truncated" and the SQL insert command is shown in the error infolog.

Description:
The issue will occur only if you have modified the field column length of a table after the records are created in Dynamics AX. When you are trying to insert the records, even though your data is within the column length, the existing rows might be inconsistent with the new data inserted. No synchronization errors are shown but the error will be only upon insert.

Resolution:
Delete the affected column and recreate the column with the correct length, impact existing data might be lost. Make sure to evaluate the issue's pro's and con's before actually deleting the columns and as a Golden rule always always backup the Database/Table before any columns are deleted. You don't want to have nasty surprises or abnormal behaviors after the deletion.


SSRS Reports Performance boost!

We always not matter how the code is optimized there is always a complaint from the user that the reports are slow from their perspective, especially if they run the reports the first time. The performance is much better though when the report is re-run again, as we say it the SSRS has warmed up to service the report requests. So it is exactly what has been incorporated in the 2012 R2 CU7 and above, there is a new report "warm up" class called the SSRSReportServerWarmup.
The warm up class will connect and load the AX assemblies to reporting server cache which cuts up a lot of time when the users will actually run the report. However you would still need to run this class as a batch job after the Reporting server restart to get the performance gain.
The best thing about the class is it is extendable and you would be able to even run up specific reports to further the performance improvements in loading and caching the assemblies before the user actually runs the report. Please do read up on the extensibility and SSRSReportServerWarmup class at the TechNet and the AX support site

Do incorporate and demonstrate to the client on the performance gains made in the SSRS report loading if they have any complaints!