This is an article on how to debug and fix one of the instances of the following error
[Microsoft][ODBC Driver 17 for SQL Server]Unicode conversion failed,
There are different reasons why we might encounter the error [Microsoft][ODBC Driver 17 for SQL Server]Unicode conversion failed.
An example is bad data on the source. The way to find the bad record is to enable Verbose logging for Target Load which should provide the Insert statement that failed.
Fetch the record ID from the insert statement and query it on the source Oracle Database then we might see the special character in one of the column values. There are a few internal parameters to handle special characters but none of them worked in this case.
The only option that worked was to Null the value in the Column since it was a Name (VARCHAR) column and the value existing was not a VARCHAR but represented something else. Once we changed the value to NULL the issue was resolved and all records in the table got replicated.
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
This issue could be also be caused by missing gconv modules on the server.
The Microsoft ODBC driver uses glibc gconv to convert character sets. However there is no dependency on the package and the driver simply fails with the error "[Microsoft][ODBC Driver 17 for SQL Server]Unicode conversion failed", if the necessary gconv modules are not installed.
On some operating systems, the glibc package already contains all the necessary gconv modules to convert from the typical character sets, however on other operating systems only ANSI C UTF-8 support is built-in and the other gconv modules are provided by the glibc-gconv-extra package .
TL;DR the fix could be to install glibc-gconv-extra .