cancel
Showing results for 
Search instead for 
Did you mean: 

HANA access via ODBC on Linux

Former Member
0 Kudos

Hi there,

I'm attempting to connect to HANA, as a data store, using ODBC from a SuSE client machine. The HANA instance is on AWS and was installed using the SAP standard HANA AMI v1.0 Rev 28.

The client is using unixODBC, and the DSN is defined as a .odbc.ini in the user's home folder:

[hana]

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

Host    = imdbhdb

Port    = 30015

I'm able to reach the HANA server, imdbhdb is defined in /etc/hosts and points to the correct Elastic IP, via telnet to port 30015.

But, when I attempt an isql connection I get the following:

user @ client:~> isql -v hana SYSTEM manager

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

[ISQL]ERROR: Could not SQLConnect

I have verified that the SuSE Firewall on the HANA server, imdbhdb, is in fact turned off.

What am I missing?

Thanks in advance!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Nass,

Need your help, We are trying to connect to SAP HANA through SUSE Linux (SAS). We installed Unix ODBC ana HANA Client on the server. Here is /etc/odbc.ini file content.

[HDB]

Driver = /appl/SAS/hdbclient/libodbcHDB.so

Host    = deeh12z1a1008

Port    = 34015

But, when I attempt an isql connection I get the following error message.

mdpfhlsc1:/etc # isql -v HDB wsasbatch MZE3RG5W

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

[ISQL]ERROR: Could not SQLConnect

Looks like you are also facing the same issue. Please help me to sort out.

Former Member
0 Kudos

use Strace to get where the location odbc refer to and create a link to it.

It could be eiher /etc/unixODBC or /usr/local/etc

Details on this source: SAP HANA Academy - SAP HANA installation: 7. HANA ODBC on Linux - YouTube

former_member182779
Active Contributor
0 Kudos

I'm sure you have done this already...but...have you checked that the port 30015 is added as Inbound in the Security Groups of your AWS instance? Should be there by default...but who knows...

Greetings,

Blag.

Former Member
0 Kudos

Thanks for the tip, Blag. The problem was actually the fact that the connection was going against localhost, and being refused - like the error message said, because nothing was listening locally obviously. It was never going over the wire.

Once I changed that, it worked like a charm.

Thanks again.

former_member182779
Active Contributor
0 Kudos

Cool! Glad to know that you could fix it

Greetings,

Blag.

0 Kudos


Hi,

We are new to Linux, we are uisng SuSE, We need to access HANA DB uisng python code.

We have installed HANA client and we have got pyodbc folder in my system. When i ran setup.PY it gave me an error "gcc failed withe exit status 1"

When we tried to resolve it we found that we need unixodbc and odbcinst to be installed. Could you please help us doing it? is there any document on it?

lbreddemann
Active Contributor
0 Kudos

As per sap note  #1577128 - Supported clients for SAP HANA  apart from the SAP client programs only connections via

  •      ODBC
  •      JDBC
  •      ODBO
  •      SQLDBC

Are supported to be used with HANA.

The python driver is not supported and used only SAP internal.

regards,

Lars

0 Kudos

Hi,

The pyodbc module interact with ODBC driver provided by SAP HANA, We are  using it for internally.

lbreddemann
Active Contributor
0 Kudos

Vinoth,

the ODBC access is supported - but not the usage of the python modules.

Please get in touch with development internally to discuss whether and how you can use this.

cheers, Lars

lbreddemann
Active Contributor
0 Kudos

Vinoth,

the ODBC access is supported - but not the usage of the python modules.

Please get in touch with development internally to discuss whether and how you can use this.

cheers, Lars

0 Kudos

Suer Lars,

We are able to access HANA DB uisng pyhon in windows. We wanted to do it in Linux too.

Thanks for your reply.

Regards,

Vinoth

0 Kudos

Can I ask how you fixed this?

I have the same error.

Thank you

John

Former Member
0 Kudos

John,

Which same error are you getting? The "rc=111:Connection refused" you mean?

If so, that is basically telling you the host isn't resolving correctly and your connection is probably going against localhost, which was my problem.

Thanks,

Nass

0 Kudos

Hi Nass

Thank you for responding, I did get around my problem.

ODBC was picking up the wrong libraries due to multiple versions of UnixODBC installed, all resolved by removed the older installations.

Thank you

John