Blog Post

Azure Database Support Blog
1 MIN READ

Lesson Learned #357:Login failed due to client TLS version being less than minimal TLS version allow

Jose_Manuel_Jurado's avatar
May 26, 2023

Today, we got a new service request with the following error message: Unable to connect to jdbc:sqlserver://XYZ.database.windows.net. Queries will be skipped for this database [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer] Reason: Login failed due to client TLS version being less than minimal TLS version allowed by the server. 

 

The error occurs because the JDBC client application or the Java container that application is running is not sending the TLS 1.2The original error for the case was resolved after properly set the  "Protocol=TLSv1.2" JVM parameter, and using the Microsoft JDBC that matches with the JavaVM  running the java code.

 

Also, you could set up using the parameter of sslProtocol=TLSv1.2 

 

		String url = String.format("jdbc:sqlserver://servername.database.windows.net:1433;database=dbname;sslProtocol=TLSv1.2;encrypt=true");
		long start = System.currentTimeMillis();
		Connection connection = DriverManager.getConnection(url, username, password);

 

 

Updated May 26, 2023
Version 1.0
No CommentsBe the first to comment