Thursday, September 1, 2016

How to use SAP HANA HDBSQL to execute SQL commands at OS level.

Home


HDBSQL is a command line tool for executing commands on SAP HANA databases.
SAP HANA HDBSQL is also used to automate the HANA Database backups using cron scripts.

Requirement: You want to access SQL prompt using HDBSQL at OS level.
Prerequisites : You need password of <SID>ADM user and User with HANA database access, in our example we are connecting using SYSTEM.

Steps :

1) Logon to HANA host with <SID>adm user.
2) Once you are logged in as <SID>adm  you can directly execute the hdbsql command , or you can go to following path and execute the hdbsql command.

cd /hana/shared/<SID>/hdbclient

Now execute the command
hdbsql  -n localhost -i 00 -u SYSTEM -p Ina123

SAP HANA HDBSQL example

Once you get the command , enter \s to get the system information you are connected to.

Exit HDBSQL by entering the command: exit or quit or \q

1 comment: