3

Our Java app use jTDS 1.3.1 to connect to SQL Server, which works fine until a client trying to put the database on Azure SQL. The connection failed with the following exception:

java.sql.SQLException: Reason: Login failed due to client TLS version being less than minimal TLS version allowed by the server.

I checked the documentation of jTDS, can't see anyway to specify TLS version. Besides replacing it with MS JDBC driver, has anyone succeeded with other work around?

I don't have access to Azure SQL, so I cannot test if reducing the TLS version to 1.0 would work.

halfer
  • 19,824
  • 17
  • 99
  • 186
user2552742
  • 312
  • 4
  • 13

2 Answers2

5

Solved the issue by chance. Just need to append ";ssl=request" to the connection string. It looks like by default SSL/TLS is disabled. The error message about TLS version is misleading. Hope this help someone in the future.

user2552742
  • 312
  • 4
  • 13
  • Appending ";ssl=request" to the Hostname field also fixed this issue for me in SQL Developer. – mrcrag Aug 09 '23 at 12:49
5

Had this same issue when trying to connect a .Net application to a Azure SQL database in Azure managed instance.

Here's how I solved it.

My previous JDBC URL was this:

jdbc:jtds:sqlserver://my-example-instance.c656df8582985.database.windows.net:1433

I just added ssl=require to the end of the URL, so it became:

jdbc:jtds:sqlserver://my-example-instance.c656df8582985.database.windows.net:1433;ssl=require
halfer
  • 19,824
  • 17
  • 99
  • 186
Promise Preston
  • 24,334
  • 12
  • 145
  • 143