Skip to Content
avatar image
Former Member

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

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();}}}
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers