Before connecting with ODBC, you need to create an ODBC DSN (Data Source Name).
ODBC DSN can either be added as User or System DSN. A System DSN will be visible to any user compared to User DSN which are defined per users.
We will be configuring System DSN in this tutorial, but if you don’t have the permission you can replicate with User DSN .
Connecting from Linux environments
To add your ODBC DSN on Linux environments, you need to add the a new section to your odbc.ini
file.
This section will be based on the following template:
[<ODBC DSN Name>]
ServerNode = <host>:<port>
Driver = HDBODBC
Description = <description>
Edit the System DSN odbc.ini
file is located in /etc/odbc.ini
and append the following:
[DSN_HXE]
ServerNode = <server ip>:39015
Driver = HDBODBC
Description = HXE Tenant
[DSN_SYSTEMDB]
ServerNode = <server ip>:39013
Driver = HDBODBC
Description = SYSTEM Database
Make sure to update the <server ip>
with the proper information.
Note : for Docker users you will need to update the HXE port to 39041 and the SYSTEMDB one to 39017.
To validate that your ODBC DSN are properly registered, you can run the following command:
odbcinst -q -s
The following output should be returned:
[HXE]
[SYSTEMDB]
Connecting from Windows environments
To add a new ODBC DSN, run the ODBC Data Source Administrator (64 bits) using the following command and switch to the System DSN tab:
odbcad32
Click on Add….
Select HDBODBC and click on Finish.
Enter the following details (replace by your instance host name or IP address):
Data Source Name |
DSN_HXE |
Description |
HXE Tenant DSN |
Server:Port |
<server host>:39015 |
Click on Connect.
Enter the database user credentials and click on OK
The connection should be successful. Click on OK.
Repeat the steps for the SYSTEMDB:
Data Source Name |
DSN_SYSTEMDB |
Description |
SYSTEM Database DSN |
Server:Port |
<server host>:39013 |
At the end, you should have both the HXE and SYSTEMDB ODBC DSN listed.
Note : for Docker users you will need to update the HXE port to 39041 and the SYSTEMDB one to 39017.