Skip to Content

PYTHON and HCP Connectivity Issue

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( '' , 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


* pyhdbcli.pdb, pyhdbcli.pyd

Please let me know what am i missing to establish a connection between HCP and python.

capture.png (19.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 10, 2017 at 07:25 PM

    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).


    Add comment
    10|10000 characters needed characters exceeded