Connect to SAP HANA 2.0 using JDBC

  • A+
所属分类:Notes

I'm trying to connect to SAP HANA 2.0 using JDBC. I took the driver ngdbc.jar from the Eclipse plugin that I installed in Windows.

Problem is that I always get the same error [Connection refused: connect], -813 even when I set a random IP address in the connection string.

 

You seem to try to connect to the SystemDB of a multi-database-container (MDC) setup of HANA. As the SystemDB is special and don't run in an indexserver process, you would use a different port (...13) to connect to it. However, usually one would want to connect to a tenant database instead. For this, the jdbc URL needs to contain then name of the database as a parameter. The HANA documentation contains the details on this.

Lars, if I use port 39013 instead of 39015 everything works perfectly, including user SYSTEM and other users, why is that?
That's the external port for the nameserver process that runs the SystemDB. I highly recommend to have a read of the documentation.
from:
https://stackoverflow.com/questions/45047612/cannot-connect-to-sap-hana-2-0-using-jdbc?rq=1

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: