Install the SAP HANA Client
- How to install the SAP HANA client
- The two locations where SAP HANA client installs can be downloaded from
- A Microsoft Windows, Mac, or Linux machine
This tutorial will demonstrate how to install the SAP HANA client. The next tutorial in this mission will demonstrate how to use HDBSQL, which is a command line utility included with the client’s installation, to connect to SAP HANA. The tutorials cover Microsoft Windows, Linux and Mac. If there are commands that are different depending on the platform, multiple sets of commands will be provided and the title will say Shell (Microsoft Windows) or Shell (Linux or Mac). Note that on Microsoft Windows, the shell used is the Command Prompt.
- Step 1
The SAP HANA client provides a set of utilities and drivers to connect to and query a SAP HANA database from multiple programming APIs, such as Node.js, Python or Java as shown below.
For a complete list, see SAP HANA Client Interface Programming Reference.
The SAP HANA client can be used to connect to different versions of SAP HANA. For example, a
2.13.xclient can connect to SAP HANA Cloud, SAP HANA Service, or SAP HANA 2.0. For more information, see SAP HANA client and server cross-version compatibility.
- Step 2
Download the client installer for your platform (Microsoft Windows, Linux, or Mac) from the SAP Development Tools website under the HANA tab and the SAP HANA Client 2.0 section.
An alternate location to download the client installer (SAP Software Downloads) is described in step 3 which includes the SAP Common Crypto library and additional platforms such as Windows 32-bit and AIX. SAP Software Downloads also may contain newer versions and patches before they are available on the SAP Development Tools site.
On Microsoft Windows, unzip the downloaded file in a temporary location.
On Linux or a Mac, use the following:Shell (Linux or Mac)Copy
tar -zxvf hanaclient*.tar.gz
Start the graphical installer
hdbsetupor use the command line installer
hdbinst.Shell (Microsoft Windows)Copy
hdbsetup.exeShell (Linux or Mac)Copy
Set the install directory to
C:\sap\hdbclienton Microsoft Windows or to
users/your_user/sap/hdbclienton Linux or macOS and complete the installation.
If the install fails, try running the installer with administrator privilege (i.e. On Microsoft Windows, right-click on
hdbsetup.exeand choose Run as an administrator).
If an older version is already installed, it can be upgraded or it can be uninstalled by running
hdbuninstfrom the folder where the client is installed. For example
After the installation process is completed, update your path environment variable so that the SAP HANA client programs such as
hdbsqlcan be found on your path. On Microsoft Windows, click the Start icon and search for environment variables.
For details on how to configure your path on a Mac see this blog post.
To configure your path on Linux:
Open an editor to edit the file
.zshrc(macOS with zsh).Shell (Linux or Mac)Copy
picowith your preferred text editor.
Add the following line to it after changing it to match the location of where the SAP HANA client was installed.Shell (Linux or Mac)Copy
Run the source command to immediately apply all the changes made to the
.bash_profilefileShell (Linux or Mac)Copy
hdbclientfolder, notice that files such as
hdbsqland the client database drivers are available.
Run the following command in a newly opened shell to verify the installation succeeded and the path is correct.ShellCopy
The install from SAP Development Tools does not contain the SAP Cryptographic Library. This can be seen by examining the
The SAP Cryptographic Library is only required when client-side data encryption is used, for LDAP Authentication or for cases where a preference is to use the SAP Common Crypto Library over the libraries provided by the OS. For more information, see the following:
- Step 3
Another download location is the Software Downloads, which requires signing in before downloading. Software Downloads provides additional platforms such as 32-bit Windows and AIX. Versions of the SAP HANA client downloaded from here include the SAP Common Crypto Library.
Download the software.
If you have a license for SAP HANA Cloud, follow the instructions at Download and Install the SAP HANA Client.
If you have a license for an on-premise version of SAP HANA, follow the instructions provided at Install the SAP HANA Client on Microsoft Windows.
The downloaded software is the same regardless of which one is used.
Extract the software using SAPCAR.
The downloaded file is a
.sarfile and the utility SAPCAR is needed to extract it. SAPCAR can also be downloaded from Software Downloads.
The command to extract a
.sarfile is shown below. The command options are extract, verbose and file.Shell (Microsoft Windows Command Prompt)Copy
SAPCAR_1010-70006231.EXE -xvf IMDB_CLIENT*.SARShell (Linux or Mac)Copy
chmod u+x SAPCAR ./SAPCAR_1010-70006178.EXE -xvf IMDB_CLIENT*.SAR
For further information on SAPCAR or if you are having troubles using it, see SAP HANA, SAPCAR, and macOS.
Congratulations! You now have the SAP HANA client installed.
Which of the following statements are true?