Skip to Content
0

[SAP DBTech JDBC: [2]: general error: SYSTEMDB not connected]

Aug 27, 2017 at 08:33 AM

237

avatar image
Former Member

When i am connecting to my sap hana data base so its throwing below exception but if i am not specifying any Database name then it connecting by default to HEX data base of sap hana.

com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sap://192.168.33.114:39015/ [SAP DBTech JDBC: [2]: general error: SYSTEMDB not connected]

Here is dummy code

<code>import java.sql.Connection;import java.sql.ResultSet;publicclassSapConnection{publicstaticvoid main(String[] args){// TODO Auto-generated method stubtry{Class.forName("com.sap.db.jdbc.Driver");String url ="jdbc:sap://192.168.33.114:39015/?databaseName=abcd";String user ="abc";String password ="xyz";Connection cn = java.sql.DriverManager.getConnection(url, user, password);// ... do whatever with the results ...}catch(Exception e){
            e.printStackTrace();}}}
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers