Install and Configure unixODBC
- How to download, install, and configure
unixODBCto connect from your SAP HANA, express edition host machine to a client machine
In the following How-To, the “host machine” refers to the machine on which you will be installing and configuring unixODBC. The “client machine” refers to the machine (or machines) you will be connecting to using unixODBC.
You will need the IP address of your host and client machine(s). Have that information available while you proceed through this how-to.
The remaining steps are performed on your host machine.
- Step 1
Before you can connect to your client database using unixODBC, you must update the client’s
hostsfile with the IP address of your SAP HANA, express edition host machine. You will need to do this with each client database.
On your client machine(s), do the following:
In Administrator mode, open hosts in Notepad. See your operating system for information on opening applications in Administrator mode.
In a new uncommented row, add the IP address of your host machine with an alias of your choosing. Save your changes.
Tip: Spacing is important. Make sure your hosts file in Notepad looks like this image.
/etc/hostson Mac and Linux
On your Mac or Linux machine, start the Terminal application.
hostsfile with the following command:bashCopy
sudo sh - c 'echo <ip_address_of_host> <alias> >> /etc/hosts'
- Step 2
If you have not registered your version of SUSE, you will have no repositories loaded onto your machine. For more information, see the SAP HANA Academy video for details.
Open a command line to your host machine.
sudo -i yast
From Software go to Software Management
Search for and install
unixodbc” in the Search Phrase section and press Enter.
Select either the 32- or 64-bit version depending on your installation.
Press Tab and press Enter to open an action menu. Highlight + and press Enter to accept.
Press F10 to accept. Installation will take a few moments.
YaSTby hitting F10 to finish and then F9 to quit.
Check if installation was successful. Run the command
odbcinst. If you see a list of commands, installation was successful.
- Step 3
Log in as
<sid>admand move to
su -l hxeadm cd /usr/sap/HXE/home
Add the following for each client machine:bashCopy
[<DATABASE_NAME>] servernode = <client_ip_address>:3<instance_number>13 #location of the unixODBC driver driver = /usr/sap/<sid>/HDB<instance_number>/exe/libodbcHDB.so description = <optional_description> databasename = <your_database_alias>
Here is an example:
[HXECLIENT] servernode = 10.100.100:39013 driver = /usr/sap/HXE/HDB90/exe/libodbcHDB.so description = Test database for unixODBC databasename = client
- Step 4
Connect to your system with the
isql <DATABASE_NAME> <user> <password>
isql HXECLIENT SYSTEM Password1
If successful, a list of commands displays:
How do you connect using isql? Swap out the variables for your own example.