Retail offline sync service: string or binary data would be truncated error
Offline Sync service fails to synchronize data with error "Bulk command BulkInsertCommand failed with the following exception. Rows will be retried during single apply. System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated."
- Schemas of store and offline databases were different. This can happen, when store database was upgraded but offline database – not (or vise versa).
Steps that worked for me
- If AX version is earlier than R3 – run Database Utility for offline database to upgrade it.
- Otherwise modify Offline database schema manually (by running SQL scripts), make sure all offline transactions came to store database. After – recreate offline database (to have schema fully equal to store database)