Hello Martin,
The error message "Could not allocate environment handle." indicates that the MS ODBC library could not initialize properly.
We experienced that error because of a bug in MS ODBC driver, related to the location of the
libmsodbcsql-13.so symbolic link, and the msodbcsqlr13.rll resource file.
The SNC ODI drivers are linked directly to
libmsodbcsql-13.so or
libmsodbcsql-17.so, and revealed this bug.
When using tools like sqlcmd, it goes through the ODBC driver manager to find the MS ODBC library like libmsodbcsql-13.1.so.9.0 located in a different directory, so the problem does not exist.
First you should consider to install the latest version of MS ODBC driver for Linux, namely version 17.1 (and soon 17.2 will arrive!).
Hopefully this should fix your issue.
If you still get the error, you may have a configuration issue, please contact you support channel so we can better help you.
You may want to use strace to check the system calls and figure out what happens (what .so or .rll resource files is not found)
Seb