Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

LATEST UPDATE: September 1, 2020 =========================================

The SAP Cloud Platform, SAP HANA Service will be retired in 2021. For more information, see

For the latest information about SAP HANA database-as-a-service, visit our blog post series about SAP HANA Cloud:


The Secure User Store for the SAP HANA client, a.k.a. hdbuserstore, can be used to safely store the connection string (server, port, username, password) as a key for secure client connections.

This SSFS (secure-store-in-the-file-system) for the SAP HANA client has been part of SAP HANA  since the initial release. Using it to connect to the SAP HANA Service requires no changes in parameters or options.

For the blog about encrypting your SAP HANA client connections with the SAP CommonCryptoLib, see

Tutorial Video

In the video tutorial below, we show how you can create a user store key for macOS (Linux) and Windows, and use it with hdbsql, the SAP HANA interactive terminal, with ODBC/JDBC, in Java and in Python.


Code Samples

Create a user store key
hdbuserstore -i Set HAASKEY system

Viewing the key store on Linux and Windows. Note that the key is the same for on-premise SAP HANA and for the SAP HANA Service. Also note that the key is the same on Linux and Windows (or macOS). Only the path to the key and data file differs a bit.

Use the key with the interactive terminal. Works on any platform.
hdbsql -U HAASKEY \
-e -sslprovider commoncrypto -ssltruststore $SECUDIR/sapcli.pse \

ODBC configuration file on Windows:

Registry entry for the User DSN:

Equivalent on Linux (and macOS):

Code sample for Python:
conn = dbapi.connect(

Used in Jupyter notebook:

Code sample for Java


YouTube Playlist(s)

The tutorials has been posted to the following playlists:


For the documentation, see

Thank you for watching

The SAP HANA Academy provides free online video tutorials for the developers, consultants, partners and customers of SAP HANA.

Topics range from practical how-to instructions on administration, data loading and modeling, and integration with other SAP solutions, to more conceptual projects to help build out new solutions using mobile applications or predictive analysis.

For the full library, see SAP HANA Academy Library - by the SAP HANA Academy.

For the full list of blogs, see Blog Posts - by the SAP HANA Academy.