on ‎2020 Feb 04 8:26 AM
Hi Experts,
I am trying to connect a SCP HANA DB which is neo environment from Python. I am using 'Python any where' platform to code.

Python code -
from hdbcli import dbapi
connection = dbapi.connect(host='vsXXXXXXX.pXX.oX.sap.bXz',
port=30013,
user='DBUSER',
password='PASSWORD'
)
print(connection.isconnected())
The response from python anywhere is -
Traceback (most recent call last): File "/home/LEONARDOMFG/connectHDB.py", line 13, in <module>password='PASSWORD'hdbcli.dbapi.Error: (-10719, "Connect failed (invalid SERVERNODE ':30052')")
Please help me out on what else is required?
Request clarification before answering.
You need to open a tunnel to that DB hosted in the cloud, like here: https://help.sap.com/viewer/d4790b2de2f4429db6f3dff54e4d7b3a/Cloud/en-US/6930850a8f9a40489c01ed1aa38...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have used the below syntax to open the tunnel:
neo open-db-tunnel -h vXXXXXXXXX.od.sap.biz -u S0XXXXXXXX_1 -a aXXXXXXXe --id JXX
The error I am getting is -
(!) ERROR; Could not connect to host: https://services.vXXXXXXXX.od.sap.biz/services/v1/instances/aXXXXXXXe/persistence/v3/dbtunnel/schema.... Make sure your proxy settings are correct
If you need help, provide the output of the command and attach the log directory [C:\Users\1USER0\Downloads\neo-java-web-sdk-3.106.14.2\tools\log]
The issue is still there.
HI @vitaliy.rudnytskiy,
Now I am getting below error:
(!) ERROR; SSL error when connecting to https://services.jXXXXXXXX.hana.ondemand.com/services/v1/instances/aXXXXXXXe/persistence/v3/dbtunnel...; server certificate might be invalid or untrusted
If you need help, provide the output of the command and attach the log directory [C:\Users\1USER0\Downloads\neo-java-web-sdk-3.104.18 (1)\tools\log]
I have tested that one as well - jXXXXXXXX.hana.ondemand.com for the python code.
Please find the below screenshot:

Please suggest what I need to do.
There are two separate steps:
You can find an example of this approach in https://blogs.sap.com/2019/04/16/connect-to-sap-hana-from-scp-neo-trial-from-sap-data-hub-developer-... post.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.