We are facing a weird error while exporting data in bacpac format from Azure SQL database and then restoring it back (using SSMS). It throws error related to
Truncated value: 2628
in one of the columns with size Varchar(256)
, collation is Latin1_General_100_CI_AS_SC_UTF8
(at source and at destination)
For some reason, there are few values with datalength 256 characters (Len is also 256) gets converted into 258 Datalength (Len is still 256) and then fails.
When we change the size of this field to 512 in the bacpac file, it passes. Any clues?
One more thing to notice is that encoding is broken in this field at source and when we query value in SSMS the characters printed are not human readable. We store the same value in one more field (for audit purpose), there we can find them in readable format.
Thanks