Install the SAP HANA Client

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). On Microsoft Windows, in this tutorial, the shell used is the Command Prompt.

Open all Close all The SAP HANA Client

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.

drivers

For a complete list, see SAP HANA Client Interface Programming Reference. For a list of newly added features, see New and Changed Features in the SAP HANA Client or the release notes. The SAP HANA client can be used to connect to different versions of SAP HANA. For example, a 2.20.x client can connect to SAP HANA Cloud or SAP HANA 2.0. For more information, see SAP HANA client and server cross-version compatibility.

Install from SAP Development Tools
  1. 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 Center) is described in step 3 which includes the SAP Common Crypto library and additional platforms such as Windows 32-bit and AIX. SAP Software Center also may contain newer versions and patches before they are available on the SAP Development Tools site.

Client Download

Shell (Linux or Mac)
tar -zxvf hanaclient*.tar.gz 
Shell (Microsoft Windows)
hdbsetup.exe 
Shell (Linux or Mac)
./hdbsetup 

Set the install directory to C:\SAP\hdbclient on Microsoft Windows or to users/your_user/sap/hdbclient on Linux or macOS and complete the installation.

Client-install

If the install fails, try running the installer with administrator privilege (i.e. On Microsoft Windows, right-click on hdbsetup.exe and choose Run as an administrator). If an older version is already installed, it can be upgraded or it can be uninstalled by running hdbuninst from the folder where the client is installed. For example, c:\sap\hdbclient\install\hdbuninst

Environment variable

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 .bash_profile , .profile , or .zshrc (macOS with zsh).

Shell (Linux or Mac)
pico ~/.bash_profile 

This tutorial uses notepad and pico as default text editors, but any text editor will do.
Pico can be installed on SUSE Linux with

Shell (Linux SUSE)
sudo zypper install pico 

Add the following line to the .bash_profile after adjusting the path to match the location of where the SAP HANA client was installed.

Shell (Linux or Mac)
export PATH=$PATH:/home/dan/sap/hdbclient 
Run the source command to immediately apply all the changes made to the .bash_profile file Shell (Linux or Mac)
source ~/.bash_profile 

Clients Post Installation

hdbsql -v 

Version of HDBSQL

The install from SAP Development Tools does not contain the SAP Cryptographic Library. This can be seen by examining the C:\SAP\hdbclient\manifest file.

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:

Alternate Install Option, SAP Software Center

Another download location is the SAP Software Center, which requires signing in before downloading. SAP Software Center provides the very latest version of the SAP HANA client as well as additional platforms such as 32-bit Windows and AIX. Versions of the SAP HANA client downloaded from here include the SAP Common Crypto Library.

  1. Select Support Packages & Patches, By Alphabetical Index, and H.

SAP for Me Download Software

Then choose either HANA Cloud Clients, HANA Cloud Clients 1.0, SAP HANA Client 2.0 or SAP HANA Platform Edition, SAP HANA Platform Edition 2.0, SAP HANA Client 2.0. 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.