Skip to Content
avatar image
Former Member

Unable to execute HDBSQL through shell script

Hello All,

I have setup an instance of HANA trial on AWS.I am trying to execute a sql script through HDBSQL tool . I need to schedule the process hence I have used an shell script.

The issue is I am able to execute the sql script only by HDBSQL tool , but not through shell script.

Sql Script :-

select * from SFLIGHT.SAPLANE

Command in HDBSQL:-

hdbadm@sid-hdb:/usr/sap/HDB/HDB00/exe/hdbsql -n <ip> -i 00 -u system –p <password> -I /usr/sap/HDB/HDB00/test_folder/query_export.sql

Command in shell script:- /usr/sap/HDB/HDB00/exe/hdbsql -n <ip> -i 00 -u system –p <password> -I /usr/sap/HDB/HDB00/test_folder/query_export.sql

Calling the shell script as :-

/usr/bin /

Response on executing above sh script :-

Prompt gets in HDBSQL tool

Password prompt : Welcome to the SAP HANA Database interactive terminal. Type: \h for help with commands \q to quit

Another observation is when ever I try to enter the HDBSQL using the command

/usr/sap/HDB/HDB00/exe/hdbsql -n <ip> -i 00 -u system –p <password>

I always get prompt to enter the password . It never accepts the password parameter.

If this is resolved I believe the above issue can also be resolved. I was trying to use hdbstore to remove the password and other cred from the code but I was unable to to do in trail version .

Can you please help me resolve the issue ,

Environment details :-

HANA details :-SAP HANA, developer edition 1.0 SPS 12

OS details:- login as: root Authenticating with public key "imported-openssh-key" Passphrase for key "imported-openssh-key": Last login: Mon Jan 15 18:27:22 2018 from xx:xx:xx:xx SUSE Linux Enterprise Server 12 SP1 x86_64 (64-bit) - Configured for SAP Cloud Appliance Library (SAPCAL) As "root" (sudo or sudo -i) use the: - zypper command for package management - yast command for configuration management Management and Config: Documentation: Forum:

Connecting through putty


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 17, 2018 at 06:27 AM

    Issue resolved . Syntax was incorrect

    Correct syntax Command in shell script:- /usr/sap/HDB/HDB00/exe/hdbsql -n <ip> -i 00 -u system -p <password> -I /usr/sap/HDB/HDB00/test_folder/query_export.sql

    Add comment
    10|10000 characters needed characters exceeded