SAP HANA - ODBC

About

ODBC

For now, it's a type 2.

Prerequisites

Console

hdbodbc_cons
Usage: odbc_cons [options] command
SQLDBC  1.00.48 Build 0372847-1510
Options:
  -h           This help screen.
  -v           Verbose operation.
  -p <pid>     Execute command only for the specified process id.
  -f           Force tool execution, even if a lock file of another
               instance is found.
  -u <user>    Perform the operation for another user.
  -H <host>    Assume virtual host name <host>.
Options must be separate, collating them is not supported.

Add a connection

Windows

connection string: server:port

_

Linux

For example, if the SAP HANA server is running on the host MyServer, as instance 01, on port 30115, and the SAP HANA client is installed at /hana/shared/HDB/hdbclient, the odbc.ini file would be:

[hanaservice] 
Driver=/hana/shared/HDB/hdbclient/libodbcHDB.so 
ServerNode=MyServer:30115 
CHAR_AS_UTF8=1
DriverUnicodeType=1

where:

  • DriverUnicodeType=1 (UTF-16)
  • DriverUnicodeType=2 (UTF-8) (Default)
[hanaodbcdatasourcename]
Driver=/hana/shared/<SID>/hdbclient/libodbcHDB.so
ServerNode=<fully.qualified.domain.name>:3XX15
CHAR_AS_UTF8=1
DriverUnicodeType=1

where:

  • XX in 3XX15 is the instance number

Support

Trace

When attempting to make a connection, you may get this error.

[08S01][unixODBC][SAP AG][LIBODBCHDB SO][HDBODBC] Communication link failure;-10709 Connection failed (RTE:[-1] Kerberos error. Major: " [851968]", minor: " [2529639107/-1765328189]")

You just forgive to give the username and password during the connection.

Documentation/Reference


Powered by ComboStrap