RJDBC Error when trying to create a connection to SQL Server

425 Views Asked by At

I have been using RODBC to do all sort of sql queries, but I ended up having to deal with a query that happens to take a painfully amount of time compared to when I run the query in SQL Server.

I found in this post that RJDBC has a better performace, so I decided to try it out.

I ended up intalling Java (both jre and jdk), setted up the Paths and the Drivers of JDBC.

I have no problem getting the driver I guess, since I got no error.

drv <- JDBC(classPath = "C:\\Program Files\\Microsoft JDBC DRIVER 11.2 for SQL Server\\sqljdbc_11.2\\enu\\mssql-jdbc-11.2.0.jre8.jar")

But when I try to create the connection I get the following error

conn <- dbConnect(drv, "jdbc:sqlserver://192.168.7.303", "my_user", "my_password")

Error in dbConnect(drv, "jdbc:sqlserver://192.168.7.303", "my_user", : Unable to connect JDBC to jdbc:sqlserver://192.168.7.303 JDBC ERROR: The driver couldn't 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:8902e2fd-d90e-47c8-8aed-7ea373c9245d

Is there a solution to this problem?

0

There are 0 best solutions below