on 10-16-2018 1:58 PM
Hi All,
I need the sample java program with kerberos authentication.
I have configured kerberos authentication in SAP HANA Database server.
I tried Single Sign-On through SAP HANA Studio.
Now i want to try SSO using jdbc java client.
Can anyone provide sample jdbc java program with kerberos authentication ?
In traditional way, We take database user and password to get connection.
static final String JDBC_DRIVER = "com.sap.db.jdbc.Driver";
static final String DB_URL = "jdbc:sap://10.0.0.1:31000";
static final String USER = "username";
static final String PASS = "password";
public static void main(String[] args) {
Connection conn = null;
Statement stmt = null;
try{
Class.forName("com.sap.db.jdbc.Driver");
System.out.println("Connecting to a SAP HANA Database...");
conn = DriverManager.getConnection(DB_URL, USER, PASS);
System.out.println("Connected database successfully...");
}
}catch(SQLException se){
se.printStackTrace();
}catch(Exception e){
e.printStackTrace();
}finally{
try{
if(conn!=null)
conn.close();
}catch(SQLException se){
se.printStackTrace();
}
}
}
}
Can anyone help me for kerberos authentication ?
kulbhushan333 Did you ever get this working? I need help on this too, or even the connection string with kerberos for that matter...I am just trying to connect to HANA from DBeaver.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.