Retail Offline Sync service: String or binary data would be truncated

Description

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.

Reason

Schemas of store and offline databases were different. This can happen, when store database was upgraded but offline database - not (or vise versa)

Steps worked for me

If AX version is earlier than R3 - run Database Utility for offline database to upgrade it.