- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Setting up a JDBC connection to remote SAP HANA system
You are using the correct Port number for instance number “00”. Port number 300315, here 00 represents instance number of your HANA system.
Try using HANA client jar file ngdbc.jar instead of SAP Jar file.
try { Class.forName("com.sap.db.jdbc.Driver"); String url ="jdbc:sap://xx.x.x.xxx:30015/DBNAME"; //IP Address of HANAsystem followed by Port number String user ="user"; String password = "password"; Connection cn = java.sql.DriverManager.getConnection(url, user, password); ResultSet rs = cn.createStatement().executeQuery("CALL Test.STORED_PROC"); // ...Enter the action here } catch(Exception e) { e.printStackTrace(); }
Advertisements