Why does connection to DSN fail when using Microsoft ODBC Driver for SQL Server on Red Hat Enterprise Linux?
Issue
- Connect using
msodbcsql
fails with error;
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Driver's SQLAllocHandle on SQL_HANDLE_HENV failed.
$ sqlcmd -S <target_server> -D
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Driver's SQLAllocHandle on SQL_HANDLE_HENV failed.
$ isql -v <DSN> <user> <password>
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise linux 6
- Microsoft ODBC Driver for SQL Server (msodbcsql)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.