LLI Wiki — My Digital Knowledge Base

SAP HANA: connect to SYSTEMDB with hdbsql

hdbsql command and SAP HANA Studio wizard to connect to the system database of a multi-container HANA system.

A memo on connecting to an SAP HANA database from the command line with hdbsql, or with SAP HANA Studio.

Connecting with hdbsql

hdbsql is the command-line client shipped with the HANA client, usually installed under /hana/shared/<SID>/hdbclient/.

/hana/shared/<SID>/hdbclient/hdbsql -i 00 -u SYSTEM -p '<PASSWORD>' -d SYSTEMDB
Option Meaning
-i instance number (two digits, for example 00)
-u user
-p password (quote it if it contains special characters)
-d database to connect to; SYSTEMDB is the system database of a multi-container system

Depending on the installation, the binary may also be in /hana/shared/<SID>/hdbclient/scripts/; if hdbclient is in the PATH of the system user (<sid>adm), plain hdbsql is enough.

Connecting with SAP HANA Studio

In the "Specify System" wizard, enter the host name (with the SQL port if needed), the instance number, then choose "Multiple containers": pick "System database" for the system database, or "Tenant database" with the tenant name.

SAP HANA Studio Specify System wizard

Notes

Mastodon LLIMastodon SocialFosstodon