Muokkaa

Jaa


Frequently asked questions (FAQ) for JDBC driver

Download JDBC driver

This page provides answers to frequently asked questions about the Microsoft JDBC Driver for SQL Server.

Frequently asked questions

How can I help improve the JDBC Driver?
The JDBC Driver is open-source and the source code can be found on GitHub. You can help improve the driver by filing issues and contributing to the code base.

Which versions of SQL Server and Java do the driver support?
See the Microsoft JDBC Driver for SQL Server support matrix page for details.

What is the difference between the JDBC driver packages available on the Microsoft download page and the JDBC driver available on GitHub?
The JDBC driver files available on the GitHub repository for the Microsoft JDBC driver are the core of the JDBC driver and are under the open-source license listed in the repository. The driver packages on the Microsoft download page include other libraries for Windows-integrated authentication and enabling XA transactions with the JDBC driver. Those other libraries are under the license included with the downloadable package.

What should I know to upgrade my driver?
The Microsoft JDBC Driver 12.8 supports the JDBC 4.2, and 4.3 (partially) specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-12.8.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0+
mssql-jdbc-12.8.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 12.6 supports the JDBC 4.2, and 4.3 (partially) specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-12.6.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0+
mssql-jdbc-12.6.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 12.4 supports the JDBC 4.2, and 4.3 (partially) specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-12.4.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0+
mssql-jdbc-12.4.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 12.2 supports the JDBC 4.2, and 4.3 (partially) specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-12.2.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0+
mssql-jdbc-12.2.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 11.2 supports the JDBC 4.2, and 4.3 (partially) specifications and includes four JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-11.2.0.jre18.jar JDBC 4.3 (partially), and 4.2 JDK 18.0
mssql-jdbc-11.2.0.jre17.jar JDBC 4.3 (partially), and 4.2 JDK 17.0
mssql-jdbc-11.2.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-11.2.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 10.2 supports the JDBC 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-10.2.0.jre17.jar JDBC 4.3 (partially), and 4.2 JDK 17.0
mssql-jdbc-10.2.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-10.2.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 9.4 supports the JDBC 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-9.4.1.jre16.jar JDBC 4.3 (partially), and 4.2 JDK 16.0
mssql-jdbc-9.4.1.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-9.4.1.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 9.2 supports the JDBC 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-9.2.0.jre15.jar JDBC 4.3 (partially), and 4.2 JDK 15.0
mssql-jdbc-9.2.0.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-9.2.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 8.4 supports the JDBC 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-8.4.1.jre14.jar JDBC 4.3 (partially), and 4.2 JDK 14.0
mssql-jdbc-8.4.1.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-8.4.1.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 8.2 supports the JDBC 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-8.2.2.jre13.jar JDBC 4.3 (partially), and 4.2 JDK 13.0
mssql-jdbc-8.2.2.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-8.2.2.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 7.4 supports the JDBC 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-7.4.1.jre12.jar JDBC 4.3 (partially), and 4.2 JDK 12.0
mssql-jdbc-7.4.1.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-7.4.1.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 7.2 supports the JDBC 4.2, and 4.3 (partially) specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-7.2.2.jre11.jar JDBC 4.3 (partially), and 4.2 JDK 11.0
mssql-jdbc-7.2.2.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 7.0 supports the JDBC 4.2, and 4.3 (partially) specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-7.0.0.jre10.jar JDBC 4.3 (partially), and 4.2 JDK 10.0
mssql-jdbc-7.0.0.jre8.jar JDBC 4.2 JDK 8.0
     

The Microsoft JDBC Driver 6.4 supports the JDBC 4.1, 4.2, and 4.3 (partially) specifications and includes three JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-6.4.0.jre9.jar JDBC 4.3 (partially), 4.2, and 4.1 JDK 9.0
mssql-jdbc-6.4.0.jre8.jar JDBC 4.2, and 4.1 JDK 8.0
mssql-jdbc-6.4.0.jre7.jar JDBC 4.1 JDK 7.0
     

The Microsoft JDBC Driver 6.2 supports the JDBC 4.0, 4.1, and 4.2 specifications and includes two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
mssql-jdbc-6.2.2.jre8.jar JDBC 4.2, 4.1, and 4.0 JDK 8.0
mssql-jdbc-6.2.2.jre7.jar JDBC 4.1 and 4.0 JDK 7.0
     

The Microsoft JDBC Drivers 6.0 and 4.2 for SQL Server supports JDBC 4.0, 4.1, and 4.2 specifications and include two JAR class libraries in the installation package as follows:

JAR JDBC Specification JDK Version
sqljdbc42.jar JDBC 4.2, 4.1, and 4.0 JDK 8.0
sqljdbc41.jar JDBC 4.1 and 4.0 JDK 7.0
     

The Microsoft JDBC Driver 4.1 for SQL Server supports the JDBC 4.0 specification and includes one JAR class library in the installation package as follows:

JAR JDBC Specification JDK Version
sqljdbc41.jar JDBC 4.0 JDK 7.0 and 6.0
     

Do I need code changes in my application to use the latest driver with my existing SQL Server version?
In general, the driver is designed to be backward compatible so that you don't need to change your existing applications to upgrade the driver. If a new driver version introduces a breaking change, the Release Notes for the JDBC Driver section provides clear details on the change and the impact to existing applications. In addition, you can review the release notes included with the driver for a list of bugs fixed and known issues in that release.

How much does the driver cost?
The Microsoft JDBC Driver for SQL Server is available at no charge.

Can I redistribute the driver?
The JDBC Drivers 6.0 and up are redistributable. Review the "Distributable Code" clause in the license agreements included in each package.

Can I use the driver to access Microsoft SQL Server from a Linux computer?
Yes! You can use the driver to access SQL Server from Linux, Unix, and other non-Windows platforms. For more information, see Microsoft JDBC Driver for SQL Server Support Matrix.

Does the driver support TLS encryption?
Starting with version 1.2, the driver supports Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), encryption. For more information, see Using encryption.

Which authentication types are supported by the Microsoft JDBC Driver for SQL Server?
The table below lists available authentication options. A pure Java Kerberos authentication is available starting with the 4.0 release of the driver.

Platform Authentication
Non-Windows Pure Java Kerberos
Non-Windows SQL Server
Non-Windows Azure Active Directory Authentication
Non-Windows NTLM
Windows Pure Java Kerberos
Windows SQL Server
Windows Kerberos with NTLM backup
Windows NTLM
Windows Azure Active Directory Authentication
   

Does the driver support Internet Protocol version 6 (IPv6) addresses?
Yes. The driver supports the use of IPv6 addresses. Use the connection properties collection and the serverName connection string property. For more information, see Building the Connection URL.

What is adaptive buffering?
Adaptive buffering is introduced starting with Microsoft SQL Server 2005 JDBC Driver version 1.2. It's designed to retrieve any kind of large-value data without the overhead of server cursors. The adaptive buffering feature of the Microsoft SQL Server JDBC Driver provides a connection string property, responseBuffering, which can be set to "adaptive" or "full". In the version 1.2 release, the buffering mode is "full" by default and the application must set the adaptive buffering mode explicitly. Starting with the JDBC Driver version 2.0, the default behavior of the driver is "adaptive". Thus, your application doesn't have to request the adaptive behavior explicitly to get the adaptive buffering behavior. For more information, see Using Adaptive Buffering and the blog What is adaptive response buffering and why should I use it?.

Does the driver support connection pooling?
The driver provides support for Java Platform, Enterprise Edition 5 (Java EE 5) connection pooling. The driver implements the JDBC 3.0 required interfaces to enable the driver to participate in any connection-pooling implementation that is provided by middleware application server vendors. The driver participates in pooled connections in these environments. For more information, see Using Connection Pooling. The driver doesn't provide its own pooling implementation, but rather it relies on third-party Java application servers.

Is support available for the driver?
Several support options are available. You can post your question or issue to the GitHub repository, which is monitored by Microsoft. Forums are monitored by Microsoft, MVPs, and the community. You can also contact Microsoft Customer Support. The development team might ask you to reproduce the issue outside any third-party application servers. If the issue can't be reproduced outside the hosting Java container environment, you need to involve the related third-party so that the team can continue to assist you. The team may also ask you to reproduce your issue on an operating system such as Windows so the problem can be best supported.

Is the driver certified for use with any third-party application servers?
The driver has been tested against various application servers including IBM WebSphere and SAP Netweaver.

How do I enable tracing?
The driver supports the use of tracing (or logging) to help resolve issues and problems with the JDBC Driver when it's used in your application. To enable the use of client-side JAR tracing, the JDBC Driver uses the logging APIs in java.util.logging. For more information, see Tracing Driver Operation. For server-side XA tracing, see Data Access Tracing in SQL Server.

Where can I download older versions of the driver such as the SQL Server 2000 JDBC driver, 2005 driver, 1.0, 1.1, or 1.2 driver?
These driver versions aren't available for download as they're no longer supported. We're continually improving the Java connectivity support. As such, we highly recommend you work with the latest version of Microsoft JDBC driver.

I'm using JRE 1.4. Which driver is compatible with JRE 1.4?
For customers who are using SAP products and require JRE 1.4 support, you can contact SAP Service Marketplace to obtain the 1.2 Microsoft JDBC driver.

Can the driver communicate using FIPS validated algorithms?
The Microsoft JDBC Driver doesn't contain any cryptographic algorithms. If a customer uses operating system, application, and JVM algorithms that are deemed acceptable by Federal Information Processing Standards (FIPS) and configures the driver to use those algorithms then the driver uses only the designated algorithms for communication. For more information, see FIPS mode.

See also