on 04-02-2013 3:08 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Lars,
No it does not work. I always get the error message "Communication link failure;-10709 Connect failed (no reachable host left)" trying to use a DSN via ODBC. It has never worked.
Only odbcreg using directly the server name and port works, not via ODBC. This means I cannot use it with php.
Thanks
Ingo
Hi Lars,
I agree on your observation about the documentation of the ODBC topic.
I will discuss with our colleagues at documentation but for the mean time, I have recorded a video for the SAP HANA Academy on configuring ODBC for Linux (RHEL and SLES). Hope this will provide some clarification.
SAP HANA Installations - SPS 08 - YouTube
Denys van Kempen, SAP HANA Academy
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.