下载地址 : SAP Development Tools https://tools.hana.ondemand.com/#hanatools
进入hanaclient-2.19.21-linux-x64
无需编译,运行 ./hdbinst
提示没有权限,执行chmod +x *
有个子目录里面的也是没有权限,进入那个子目录 执行chmod +x *
终于安装上了 :
装好后,下一步是配置odbc数据源
vim /etc/odbc.ini
[SAPHDB]
Driver=/usr/sap/hdbclient/libodbcHDB.so
ServerNode=hostname:30015
配好数据源后,测试连接,如果不带账号密码就会报错:
# isql SAPHDB -v
[08S01][unixODBC][SAP AG][LIBODBCHDB SO][HDBODBC] Communication link failure;-10709 Connection failed (RTE:[-1] Kerberos error. Major: "unspecified [851968]", minor: "No Kerberos credentials available [2529639053/-1765328243]")
[ISQL]ERROR: Could not SQLConnect
带上账号密码就ok了:
]# isql SAPHDB your_count your_pwd -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>