Skip to Content
author's profile photo Former Member
Former Member

Connect to HANA with unixODBC fails

Dear community

I like to connect with PHP to the HANA server, using all information from the treads (http://scn.sap.com/message/13382450#13382450 http://scn.sap.com/thread/2134802 http://scn.sap.com/thread/3204662 )

I tried the following on the HANA box (SLES 10 SP2) itself and from a linux client (openSuse 12.2)

Using unixODBC with isql i get always the following error messages

isql DSN SYSTEM secret -v

openSuse 32Bit: (downloaded from here)

[08S01][unixODBC][SAP AG][LIBODBCHDB32 SO][HDB] Communication link failure;-10709 Connect failed (no reachable host left)

SLES 10SP2 64Bit (download from here)

[08S01][unixODBC][SAP AG][LIBODBCHDB SO][HDB] Communication link failure;-10709 Connect failed (no reachable host left)

The error comes imediatly which gives me the impression, that the ServerNode parameter is not interpreted at all

openSuse 32Bit:

/etc/unixODBC/odbc.ini:

[HANADSN]

Driver=/usr/sap/hanaclient32/libodbcHDB32.so

ServerNode=hanab1:30015

SLES 10SP2 64Bit

/etc/unixODBC/odbc.ini:

[HANADSN]

Driver=/usr/sap/hanaclient/libodbcHDB.so

ServerNode=hanab1:30015

I tried with unixODBC 2.12 and also 2.3. On the HANA host it self I tried with localhost, 127.0.0.1 and the IP address

On the openSUSE Client I tried servername and ip-address.

To use /usr/sap/hdbclient32/odbcreg32 (or /usr/sap/hdbclient/odbcreg) I got first an error message, that the libodbcHDB... was not found.

LD_LIBRARY_PATH=/usr/sap/hdbclient32/ and export LD_LIBRARY_PATH solved that problem

using odbcreg SERVER:PORT NDB SYSTEM sercret works. Connects to HANA and shows now()

Using odbcreg DSN SYSTEM secret does not work, shows the same error as above immediately (not timeout waiting for the connection).

I assume, that the parameter ServerNode= is not interpreted. I have tried Host= / Port= and Server=, but always the same result.

It would be helpfull, when SAP publishes an odbctemplate, that tools like ODBCconfig (X-Windows tool to configure the odbc.ini file) can work.

Thanks

Ingo

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 03, 2013 at 03:23 AM

    Success: There is bug in the ODBC Driver. The parameter ServerNode is read from /etc/odbc.ini instead of /etc/unixODBC/odbc.ini. When I copy the file in both locations isql can connect. [I found that using strace -f -eopen isql TESTDSN SYSTEM secret]

    Method1 works for isql HANALocDSN SYSTEM secret

    UserDNS = ~/.odbc.ini for example /root/.odbc.ini

    [HANALocDSN]

    Driver=/loc/sap/libodbcHDB.so

    ServerNode=hanab1:10015

    Method2 works for isql HANADSN SYSTEM secret

    SystemDSN

    /etc/unixODBC/odbc.ini

    [HANADSN]

    Driver=/loc/sap/libodbcHDB.so

    ServerNode=hanab1:10015

    and a copy in /etc/odbc.ini

    [HANADSN]

    Driver=/loc/sap/libodbcHDB.so

    ServerNode=hanab1:10015

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 02, 2013 at 09:00 AM

    Hi Ingo,

    I take it that you finally managed to get the ODBC connection going. Is that right?

    Reading your thread post I agree that currently the developer documentation for JDBC/ODBC is pretty thin and needs to be extended.

    However, the thread is marked as a question and I fail to find the question in your post.

    So what exactly is it you want to know?

    - Lars

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2015 at 12:42 PM

    Hi Ingo ,

    Thanks for the reply .

    I tried without _ with the ODBC still have the same error .

    I guess its 64 bit but not sure .Any more suggestions ?

    Thanks

    Maruf

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2015 at 01:22 PM

    HI ,

    i tried the below command it dnt work coz it AIX may be .

    strace -f -eopen isql HANA USENAME PASS

    I tried truss

    truss isql HANA USENAME PASS.

    Please find the attached file for details .


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.