SUSE Support

Here When You Need Us

unixODBC with mariadb: isql fails with SQLAllocHandle on SQL_HANDLE_HENV failed

This document (7024279) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server 12 Service Pack 4 (SLES 12 SP4)


unixODBC was set up using library from package libmariadb3:

/etc/unixODBC/odbcinst.ini and /etc/unixODBC/odbc.ini were set up as follows:

odbcinst -i -s -l -f MariaDB_odbc_data_source_template.ini
Description=MariaDB server
Driver=MariaDB ODBC

odbcinst -i -d -f MariaDB_odbc_driver_template.ini
[MariaDB ODBC]
Description = MariaDB Connector/ODBC
Driver = /usr/lib64/ 

Running "isql" command fails as follows:
sles12sp4:~ # isql -v "MariaDB-server"
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect


Package MyODBC-unixODBC conatins correct library "/usr/lib64/".

odbcinst -i -d -f MariaDB_odbc_driver_template.ini
[MariaDB ODBC]
Description = MariaDB Connector/ODBC
Driver = /usr/lib64/


Package "libmariadb3" which provides "/usr/lib64/" is a connector for C/C++.


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7024279
  • Creation Date: 21-Nov-2019
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.