How do I install JDBC driver on Microsoft SQL Server 2019 database ?

Cindy See 206 Reputation points
2023-02-13T08:49:18.4+00:00

Hi,

I downloaded jre and install in X:\Program Files\Java\jre1.8.0_361 folder and sqljdbc_12.2.0.0_enu driver and extracted it in X:\Program Files\Microsoft JDBC DRIVER 12.2 for SQL Server\sqljdbc_12.2\enu folder.

I also set

classpath (system variable) to X:\Program Files\Microsoft JDBC DRIVER 12.2 for SQL Server\sqljdbc_12.2\enu\mssql-jdbc-12.2.0.jre8.jar

path (system variable) to X:\Program Files\Java\jre1.8.0_361\bin

Do I need to copy any jdbc.dll file from the JDBC driver folder to c:\windows\system32?

When I run ConnectURL to test out the connectivity, this error occurs

Error: Could not find or load main class ConnectURL

How do I verify that JDBC is installed correctly and properly.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
568 questions
SQL Server | Other
{count} votes

Accepted answer
  1. Seeya Xi-MSFT 16,586 Reputation points
    2023-02-14T02:23:03.2333333+00:00

    Hi @Cindy See ,

    Do I need to copy any jdbc.dll file from the JDBC driver folder to c:\windows\system32?

    Please refer to this document: Connecting with integrated authentication On Windows

    To use integrated authentication, copy the mssql-jdbc_auth-<version>-<arch>.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

    What's more, there are some related documents here.

    Using the JDBC driver: https://learn.microsoft.com/en-us/sql/connect/jdbc/using-the-jdbc-driver?view=sql-server-ver16

    Connection URL sample: https://learn.microsoft.com/en-us/sql/connect/jdbc/connection-url-sample?view=sql-server-ver16

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.