on 05-10-2017 11:07 AM - last edited on 02-03-2024 11:14 PM by postmig_api_4
I am trying to establish a connection with my HCP trail account from python but facing the below issue:
The code snippet i used to establish this connection is :
import dbapi
conn = dbapi.connect( 'hanatrial.ondemand.com' , 30015, 'p1942054738', 'xxxxxx')
print ( conn.isconnected())
Please note :
- i have placed this code under python folder of hdbclient.
- I have copied these files into the Lib folder of python
* __init__.py, dbapi.py, resultrow.py
* pyhdbcli.pdb, pyhdbcli.pyd
Please let me know what am i missing to establish a connection between HCP and python.
No really sure what you are trying to do with that connection string. If you wanna connect to a HANA DB (MDC or shared) that will not work, cause at the host an port do not exist in that way.
You either have to open a DB tunnel using the Cloud Platform console client (open-db-tunnel) or set up a service channel using the SAP Cloud Platform Connector Cloud Connector. The 2nd option is the preferred one. With the Cloud Connector you connect to the Cloud Platform using your Cloud Platform Account name and user. Then you can define a service channel to your HANA DB, using your HANA credentials.
Consider that you have used the Cloud Platform user name in your example which will not work (except you have defind in your HANA DB a user with the same name).
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.