4

I'm using the same credentials as before update. It writes:

[08S01] The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".
ClientConnectionId:ebe9ba87-4c34-4015-b6c8-a151bdf33a67 unable to find valid certification path to requested target

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Intolighter
  • 150
  • 3
  • 15
  • I don't remember where but it happened to me once when it said no data source was configured for the SQL I wrote. When I went in to configure the data source and updated the driver for SQL server to latest, I had that problem. Replacing the driver with an older one (9.x?) solved the problem. In another project that I am working on now (Rider 2022.1) I could directly go and add an SQL server with no problems: DBMS: Microsoft SQL Server (ver. 15.00.2080) Case sensitivity: plain=mixed, delimited=mixed Driver: JetBrains JDBC Driver for SQL Server (ver. 1.0, JDBC4.2) Ping: 78 ms SSL: no – Cetin Basoz Apr 28 '22 at 14:38
  • 2
    Your SQL Server is providing either a self-cerified certificate or a certificate which is not trusted by the client. You need to give it a certificate which will be trusted – Charlieface Apr 28 '22 at 16:29

4 Answers4

10

Adding Encrypt=false to the JDBC string disables the secure protocol and bypasses the certificate problem.

user2176745
  • 491
  • 4
  • 11
  • Better to encrypt and use the server certificate than turn off encryption entirely. – Doug Aug 30 '23 at 12:22
4

(Adding here because didn't fit in comments) I don't remember where but it happened to me once when it said no data source was configured for the SQL I wrote. When I went in to configure the data source and updated the driver for SQL server to latest, I had that problem. Replacing the driver with an older one (9.x?) solved the problem. In another project that I am working on now (Rider 2022.1) I could directly go and add an SQL server with no problems (used windows authentication):

DBMS: Microsoft SQL Server (ver. 15.00.2080)
Case sensitivity: plain=mixed, delimited=mixed
Driver: JetBrains JDBC Driver for SQL Server (ver. 1.0, JDBC4.2)
Ping: 78 ms 
SSL: no
Cetin Basoz
  • 22,495
  • 3
  • 31
  • 39
0

In Rider 2022.1 we have implemented JDBC SQL Driver which is able to connect to MS SQL Server in a better way then a default (microsoft) one using named pipes and any kind of authentication. You can use .net connection strings there.

It should work find out of the box. If something does not work please fire an issue in JetBrains public issue tracker:

https://youtrack.jetbrains.com/newIssue?project=RIDER

xtmq
  • 3,380
  • 22
  • 26
0

Version 10.2 changed the default value of "encrypt" to "true" where previously it was "false".

You have three options: install a certificate, use the server's self-signed certificate, or turn encryption off again. The first option is the most secure.

To use the self-signed certificate, open the connection properties, go to the Advanced tab, and set "trustServerCertificate" to "true":

screenshot of data source advanced settings tab (Screenshot from DataGrip, but it should look the same in Rider.)

Doug
  • 2,400
  • 2
  • 18
  • 24