cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc driver for SAP HANA?

Former Member
0 Kudos

Hi,

I was deployed excel file reader application using tomcat 7. For the back end purpose i used oracle 11g(oracle.jdbc.driver.OracleDriver ). How could I deploy the same application using SAP Netweaver Cloud and which driver i have to use for SAP HANA DB.

Thanks and Regards,

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

matt_steiner
Active Contributor
0 Kudos

Hi Manoj,

well, in fact the whole idea of a PaaS such as NW Cloud is to abstract these things for you so that you would need to worry about drivers, DB connection pooling etc.

Hence, if you deploy your app to a HANA-backed account on NW Cloud you'd get a DataSource provisioned to you that automatically uses the right JDBC driver.

For more information please read this help document: https://help.netweaver.ondemand.com/default.htm?persistence_jdbc.html

More info on the Persistence Service:  https://help.netweaver.ondemand.com/default.htm?persistence_service.html

Please note that HANA DB is not yet available for public (e.g. on trial landscape.)

Best regards,

Matthias

Former Member
0 Kudos

Hi Matthias,

Thanks for your quick response. I have SAP HANA Server Access. In JAVA Servlet i used following code for Oracle database initialization. How to initialize SAP HANA DB into JAVA Servlet and how to deploy this application into Cloud.

Connection connection;

                        Statement statement;

                        Class.forName("oracle.jdbc.driver.OracleDriver");

                         connection = DriverManager.getConnection("jdbc:oracle:thin:@10.138.14.22:1521:testdb", "test", "test");

                statement = connection.createStatement();

Thanks and Regards,

Manoj

carlos_weffer
Participant
0 Kudos

Hi Manoj

I just would like to confirm what I am understanding from this post.

You did actually connected to your own HANA DB (I do have one at AWS) using the Orcale jdbc driver?

So you are actually able to select/insert/update/delete data from/to your HANA DB tables.

Have you managed to deploy your application to the cloud?

Kind Regards

Carlos

Former Member
0 Kudos

Hi Carlos,

No, I used above code to connect 'Oracle DB' from my Java Servlet on Apache Tomcat 7 Server. i just want to know the code used to connect the 'HANA DB' from a Java Servlet onto the cloud.

Thanks and Regards,

Manoj

Former Member
0 Kudos

Hi,

I tried that monts ago. But I couldnt achieve that. When I asked that to SAP, they said me ports are not allowed. But in my local testing I achieved that.     

matt_steiner
Active Contributor
0 Kudos

Hi Manoj,

Hm, still not sure about your setup. Are you using NW Cloud at all? If so, then Erhan told you the current situation already: for security reasons we only allow HTTP/HTTPS Ports on the cloud platform. Very soon, you will have access to HANA from within NW Cloud thoug, and then you can use the code snippets provided in the JDBC tutorial linked in my first post to your question.

IF however, you got access to HANA voa out developer license and hosted on AWS you can of course connect to it. For that you'd need of course access to the JDBC driver on the system executing the servlet. I'm on the road at the moment nd hence i do not have the concrete jdbc connection string at hand. If this is the scenario - then you may be better off posting it in the SAP HANA developer center though...

Cheers,

Matthias

Former Member
0 Kudos

And another way for connecting HANA: Use Netweaver Gateway services. It work only for read only access.

Former Member
0 Kudos

Hi all - Thanks for all your responses. I get that there is no test access to a HANA cloud server service currently available

Mathias/Erhan,

Can we connect from a netweaver cloud PAAS application to a onPremise Hana.

What are the steps that we need to follow for that? Do we need any installation on onPremise server side?

matt_steiner
Active Contributor
0 Kudos

No, you cannot connect from NetWeaver Cloud PaaS to an OnPremise HANA DB, at least not in the short-term.

Answers (1)

Answers (1)

Former Member
0 Kudos

So is there a jdbc jar that we need to download from SAP in order to connect to an AWS instance of HANA ONE?

If so, where can we download it?

former_member197208
Participant
0 Kudos

AFAIK, the driver is part of the "client" installation of HANA - you should find it in the directory.

If you run an application on NetWeaver Cloud, it is part of the runtime and I believe it should simply be possible to use the DriverManager. Have you tried that?

Former Member
0 Kudos

Yes, you are correct. It seems the needed jar is ngdbc.jar and can be pulled from a sub directory of the SAP HANA Client Developer Edition after it is installed. Thanks for the response.