I have one data base that is enabled ssl. How to connect that data base through JDBC driver. I have tried jdbc:sqlserver://10.29.34.222:1433;databaseName=test this jdbc url is worked for both ssl enabled database and ssl not enabled database. What cloud be the exact jdbc url for ssl is enabled or not enabled time.?
1 Answer
can you try with :
String connectionUrl =
"jdbc:sqlserver://10.29.34.222:1433;" +
"databaseName=test;integratedSecurity=true;" +
"encrypt=true;trustServerCertificate=true";
For more details: https://learn.microsoft.com/fr-fr/sql/connect/jdbc/connecting-with-ssl-encryption?view=sql-server-ver15
1 Comment
madhusudhan
If database base ssl is enabled url should be different and if ssl is not enabled then url should be different. Those url's I am looking.