Error: "invalid schema name" even if schema is present in the database in SAP HANA


I think you need to mention database name in JDBC URL while connecting to the database. Try following −

String server = "servername.domain.com";
String instance = "03";
String database = "TEST";
String dbUsername = "USERNAME";
String dbPassword = "xxxxxx";
String jdbcUrl = "jdbc:sap://" + server + ":3" + instance + "15/?currentschema=" + database + "&user=" + dbUsername + "&password=" + dbPassword;
java.sql.Connection connection = java.sql.DriverManager.getConnection(jdbcUrl);

Updated on: 30-Jul-2019

702 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements