Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

unixodbc to HANA - connect problem

I am trying to connect to HANA from unixodbc on Linux (ultimately to connect from Python). Can't get it work. Any hints?



I can successfully connect using hdbsql

oberstet@ubuntu10bld_klon0:~/hana$ hdbsql -n -u SYSTEM -p secret

Welcome to the SAP HANA Database interactive terminal.

Type:  \h for help with commands

       \q to quit

hdbsql=> \s

host          : imdbhdb:30015

database      : HDB

user          : SYSTEM

kernel version:

autocommit    : ON

hdbsql HDB=> \q

Using unixodbc it fails:

oberstet@ubuntu10bld_klon0:~/hana$ isql HANA SYSTEM secret -v

[08S01][unixODBC][SAP AG][LIBODBCHDB32 SO][HDB] Communication link failure;-10709 Connection failed (RTE:[89006] System call 'connect' failed, rc=111:Verbindungsaufbau abgelehnt)

[ISQL]ERROR: Could not SQLConnect

The DSN configuration is this:

oberstet@ubuntu10bld_klon0:~/hana$ cat /etc/odbc.ini


Description     = ODBC for SAP HANA

Driver          = /usr/sap/hdbclient32/

Host            =

Port            = 30015

Former Member
Former Member replied

Ok, figured it out (this really needs to be documented .. lost 2 hours trial and error):

oberstet@ubuntu10bld_klon0:~/hana$ cat /etc/odbcinst.ini


Description     = ODBC Driver for SAP HANA

Driver          = /usr/sap/hdbclient32/


oberstet@ubuntu10bld_klon0:~/hana$ cat

import pyodbc


cur = conn.cursor()

cur.execute("select * from test1.t1")

print cur.fetchall()


I was only able to figure out the correct connection string by reverse eng. of /usr/sap/hdbclient32/odbcreg32, which seems to be some test tool.

I was not able to setup a correct, usable DSN. Only via above (direct connection string).

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question