Posted  by 

Download Microsoft Sql Server Jdbc Driver Version 2.0

With the new release of the SQL Server JDBC Driver, Microsoft is bridging JAVA applications with its data platform. The Redmond company explained th. Microsoft JDBC Driver for SQL Server.; 2 minutes to read Contributors. In this article. Download JDBC Driver. In our continued commitment to interoperability, Microsoft provides a Java Database Connectivity (JDBC) driver for use with SQL Server, and Azure SQL Database.

-->

To access data from a SQL Server or Azure SQL Database by using the Microsoft JDBC Driver for SQL Server, you must have the following components installed on your computer:

  • Microsoft JDBC Driver for SQL Server (download)
  • Java Runtime Environment

Java Runtime Environment requirements

Starting with the Microsoft JDBC Driver 7.4 for SQL Server, Java Development Kit (JDK) 12.0 and Java Runtime Environment (JRE) 12.0 are supported.

Starting with the Microsoft JDBC Driver 7.2 for SQL Server, Java Development Kit (JDK) 11.0 and Java Runtime Environment (JRE) 11.0 are supported.

Starting with the Microsoft JDBC Driver 7.0 for SQL Server, Java Development Kit (JDK) 10.0 and Java Runtime Environment (JRE) 10.0 are supported.

Starting with the Microsoft JDBC Driver 6.4 for SQL Server, Java Development Kit (JDK) 9.0 and Java Runtime Environment (JRE) 9.0 are supported.

Starting with the Microsoft JDBC Driver 4.2 for SQL Server, Java Development Kit (JDK) 8.0 and Java Runtime Environment (JRE) 8.0 are supported. Support for Java Database Connectivity (JDBC) Spec API has been extended to include the JDBC 4.1 and 4.2 API.

Starting with the Microsoft JDBC Driver 4.1 for SQL Server, Java Development Kit (JDK) 7.0 and Java Runtime Environment (JRE) 7.0 are supported.

Starting with the Microsoft JDBC Driver 4.0 for SQL Server, the JDBC driver support for Java Database Connectivity (JDBC) Spec API has been extended to include the JDBC 4.0 API. The JDBC 4.0 API was introduced as part of the Java Development Kit (JDK) 6.0 and Java Runtime Environment (JRE) 6.0. JDBC 4.0 is a superset of the JDBC 3.0 API.

When you deploy the Microsoft JDBC Driver for SQL Server on Windows and UNIX operating systems, you must use the installation packages, sqljdbc_<version>_enu.exe, and sqljdbc_<version>_enu.tar.gz, respectively. For more information about how to deploy the JDBC Driver, see Deploying the JDBC driver topic.

Microsoft JDBC Driver 7.4 for SQL Server:

The JDBC Driver 7.4 includes three JAR class libraries in each installation package: mssql-jdbc-7.4.1.jre8.jar, mssql-jdbc-7.4.1.jre11.jar, and mssql-jdbc-7.4.1.jre12.jar.

The JDBC Driver 7.4 is designed to work with and be supported by all major Java virtual machines, but is tested only on OpenJDK 1.8, OpenJDK 11.0, OpenJDK 12.0, Azul Zulu JRE 1.8, Azul Zulu JRE 11.0, and Azul Zulu JRE 12.0.

The following summarizes support provided by the two JAR files included with Microsoft JDBC Drivers 7.4 for SQL Server:

JARJDBC Version ComplianceRecommended Java VersionDescription
mssql-jdbc-7.4.1.jre8.jar4.28Requires a Java Runtime Environment (JRE) 1.8. Using JRE 1.7 or lower throws an exception.
New Features in 7.4 include: JDK 12 support, NTLM authentication, and useFmtOnly.
mssql-jdbc-7.4.1.jre11.jar4.311Requires a Java Runtime Environment (JRE) 11.0. Using JRE 10.0 or lower throws an exception.
New Features in 7.4 include: JDK 12 support, NTLM authentication, and useFmtOnly.
mssql-jdbc-7.4.1.jre12.jar4.312Requires a Java Runtime Environment (JRE) 12.0. Using JRE 11.0 or lower throws an exception.
New Features in 7.4 include: JDK 12 support, NTLM authentication, and useFmtOnly.

The JDBC Driver 7.4 is also available on the Maven Central Repository and can be added to a Maven project by adding the following code in the POM.XML:

Microsoft JDBC Driver 7.2 for SQL Server:

The JDBC Driver 7.2 includes two JAR class libraries in each installation package: mssql-jdbc-7.2.2.jre8.jar, and mssql-jdbc-7.2.2.jre11.jar.

The JDBC Driver 7.2 is designed to work with and be supported by all major Java virtual machines, but is tested only on OpenJDK 8.0, OpenJDK 11.0, Azul Zulu JRE 8.0 and Azul Zulu JRE 11.0.

The following summarizes support provided by the two JAR files included with Microsoft JDBC Drivers 7.2 for SQL Server:

JARJDBC Version ComplianceRecommended Java VersionDescription
mssql-jdbc-7.2.2.jre8.jar4.28Requires a Java Runtime Environment (JRE) 8.0. Using JRE 7.0 or lower throws an exception.
New Features in 7.2 include: JDK 11 support, Active Directory Managed Service Identity (MSI) authentication, OSGi support, SQLServerError APIs.
mssql-jdbc-7.2.2.jre11.jar4.310Requires a Java Runtime Environment (JRE) 11.0. Using JRE 10.0 or lower throws an exception.
New Features in 7.2 include: JDK 11 support, Active Directory Managed Service Identity (MSI) authentication, OSGi support, SQLServerError APIs.

The JDBC Driver 7.2 is also available on the Maven Central Repository and can be added to a Maven project by adding the following code in the POM.XML:

Microsoft JDBC Driver 7.0 for SQL Server:

The JDBC Driver 7.0 includes two JAR class libraries in each installation package: mssql-jdbc-7.0.0.jre8.jar, and mssql-jdbc-7.0.0.jre10.jar.

The JDBC Driver 7.0 is designed to work with and be supported by all major Java virtual machines, but is tested only on OpenJDK 8.0, and 10.0.

The following summarizes support provided by the two JAR files included with Microsoft JDBC Drivers 7.0 for SQL Server:

JARJDBC Version ComplianceRecommended Java VersionDescription
mssql-jdbc-7.0.0.jre8.jar4.28Requires a Java Runtime Environment (JRE) 8.0. Using JRE 7.0 or lower throws an exception.
New Features in 7.0 include: JDK 10 support, updated default compliance level to JDBC 4.2 specifications, Spatial Datatypes support, cancelQueryTimeout connection property, Request Boundary methods, useBulkCopyForBatchInsert connection property, Data Discovery and Classification information, UTF-8 feature extension, and CityHash support.
mssql-jdbc-7.0.0.jre10.jar4.310Requires a Java Runtime Environment (JRE) 10.0. Using JRE 9.0 or lower throws an exception.
New Features in 7.0 include: JDK 10 support, updated default compliance level to JDBC 4.2 specifications, Spatial Datatypes support, cancelQueryTimeout connection property, Request Boundary methods, useBulkCopyForBatchInsert connection property, Data Discovery and Classification information, UTF-8 feature extension, and CityHash support.

The JDBC Driver 7.0 is also available on the Maven Central Repository and can be added to a Maven project by adding the following code in the POM.XML:

Microsoft JDBC Driver 6.4 for SQL Server:

The JDBC Driver 6.4 includes three JAR class libraries in each installation package: mssql-jdbc-6.4.0.jre7.jar, mssql-jdbc-6.4.0.jre8.jar, and mssql-jdbc-6.4.0.jre9.jar.

The JDBC Driver 6.4 is designed to work with and be supported by all major Java virtual machines, but is tested only on OpenJDK 7.0, 8.0, and 9.0.

The following summarizes support provided by the three JAR files included with Microsoft JDBC Drivers 6.4 for SQL Server:

JARJDBC Version ComplianceRecommended Java VersionDescription
mssql-jdbc-6.4.0.jre7.jar4.17Requires a Java Runtime Environment (JRE) 7.0. Using JRE 6.0 or lower throws an exception.
New Features in 6.4 include: Azure AD authentication for Linux, Principal/Password method for Kerberos, automatic detection of REALM in SPN for Cross-Domain authentication, Kerberos Constrained Delegation, Query Timeout, Socket Timeout, and prepared statement handle re-use.
mssql-jdbc-6.4.0.jre8.jar4.28Requires a Java Runtime Environment (JRE) 8.0. Using JRE 7.0 or lower throws an exception.
New Features in 6.4 include: Azure AD authentication for Linux, Principal/Password method for Kerberos, automatic detection of REALM in SPN for Cross-Domain authentication, Kerberos Constrained Delegation, Query Timeout, Socket Timeout, and prepared statement handle re-use.
mssql-jdbc-6.4.0.jre9.jar4.39Requires a Java Runtime Environment (JRE) 9.0. Using JRE 8.0 or lower throws an exception.
New Features in 6.4 include: Azure AD authentication for Linux, Principal/Password method for Kerberos, automatic detection of REALM in SPN for Cross-Domain authentication, Kerberos Constrained Delegation, Query Timeout, Socket Timeout, and prepared statement handle re-use.

The JDBC Driver 6.4 is also available on the Maven Central Repository and can be added to a Maven project by adding the following code in the POM.XML

Microsoft JDBC Driver 6.2 for SQL Server:

The JDBC Driver 6.2 includes two JAR class libraries in each installation package: mssql-jdbc-6.2.2.jre7.jar, and mssql-jdbc-6.2.2.jre8.jar.

The JDBC Driver 6.2 is designed to work with and be supported by all major Java virtual machines, but is tested only on Sun JRE 5.0, 6.0, 7.0, and 8.0.

The following summarizes support provided by the two JAR files included with Microsoft JDBC Drivers 6.0 and 4.2 for SQL Server:

JARJDBC Version ComplianceRecommended Java VersionDescription
mssql-jdbc-6.2.2.jre7.jar4.17Requires a Java Runtime Environment (JRE) 7.0. Using JRE 6.0 or lower throws an exception.
New Features in 6.2 include: Azure AD authentication for Linux, Principal/Password method for Kerberos, automatic detection of REALM in SPN for Cross-Domain authentication, Kerberos Constrained Delegation, Query Timeout, Socket Timeout, and prepared statement handle re-use.
mssql-jdbc-6.2.3.jre8.jar4.28Requires a Java Runtime Environment (JRE) 8.0. Using JRE 7.0 or lower throws an exception.
New Features in 6.2 include: Azure AD authentication for Linux, Principal/Password method for Kerberos, automatic detection of REALM in SPN for Cross-Domain authentication, Kerberos Constrained Delegation, Query Timeout, Socket Timeout, and prepared statement handle re-use

The JDBC Driver 6.2 is also available on the Maven Central Repository and can be added to a Maven project by adding the following code in the POM.XML

Microsoft JDBC Driver 6.0 and 4.2 for SQL Server:

The JDBC Drivers 6.0 and 4.2 include two JAR class libraries in each installation package: sqljdbc41.jar, and sqljdbc42.jar.

The JDBC Drivers 6.0 and 4.2 are designed to work with and be supported by all major Java virtual machines, but is tested only on Sun JRE 5.0, 6.0, 7.0, and 8.0.

The following summarizes support provided by the two JAR files included with Microsoft JDBC Drivers 6.0 and 4.2 for SQL Server:

JARJDBC Version ComplianceRecommended Java VersionDescription
sqljdbc41.jar4.17Requires a Java Runtime Environment (JRE) 7.0. Using JRE 6.0 or lower throws an exception.
New Features in 6.0 & 4.2 packages include: JDBC 4.1 Compliance and Bulk Copy
In Addition, new Features in only the 6.0 package include: Always Encrypted, Table-Valued Parameters, Azure Active Directory Authentication, transparent connections to Always On Availability Groups, improvement in parameter metadata retrieval for prepared queries and Internationalized Domain Name (IDN)
sqljdbc42.jar4.28Requires a Java Runtime Environment (JRE) 8.0. Using JRE 7.0 or lower throws an exception.
New Features in 6.0 & 4.2 packages include: JDBC 4.1 Compliance, JDBC 4.2 Compliance, and Bulk Copy
In Addition, new Features in only the 6.0 package include: Always Encrypted, Table-Valued Parameters, Azure Active Directory Authentication, transparent connections to Always On Availability Groups, improvement in parameter metadata retrieval for prepared queries and Internationalized Domain Name (IDN)

Microsoft JDBC Driver 4.1 for SQL Server:

The JDBC Driver 4.1 includes one JAR class library in each installation package: sqljdbc41.jar.

JARDescription
sqljdbc41.jarsqljdbc41.jar class library provides support for JDBC 4.0 API. It includes all of the features of the JDBC 4.0 driver as well as the JDBC 4.0 API methods. JDBC 4.1 is not supported (throws an exception 'SQLFeatureNotSupportedException').
sqljdbc41.jar class library requires a Java Runtime Environment (JRE) 7.0. Using sqljdbc41.jar on JRE 6.0 and 5.0 throws an exception.

The JDBC driver is designed to work with and be supported by all major Java virtual machines, but is tested on Sun JRE 5.0, 6.0 and 7.0.

The following summarizes support provided by the JAR file included with Microsoft JDBC Driver 4.1 for SQL Server.

JARJDBC VersionJRE (can run)JDK (can compile)
sqljdbc41.jar477 6 5

SQL Server requirements

The JDBC driver supports connections to Azure SQL database and SQL Server. For Microsoft JDBC Driver 4.2 and 4.1 for SQL Server, support begins with SQL Server 2008.

Operating System requirements

The JDBC driver is designed to work on any operating system that supports the use of a Java Virtual Machine (JVM). However, only Sun Solaris, SUSE Linux, and Windows operating systems have officially been tested.

Supported languages

The JDBC driver supports all SQL Server column collations. For more information about the collations supported by the JDBC driver, see International features of the JDBC driver.

For more information about collations, see 'Working with Collations' in SQL Server Books Online.

See also

-->

This article lists the releases of the Microsoft JDBC Driver for SQL Server. For each release version, the changes are named and described.

7.4.1

Compliance

August 2, 2019

Compliance changeDetails
Download the latest updates for JDBC Driver 7.4.• Microsoft Download Center
• GitHub, 7.4.1
• Maven Central
Fully compliant with JDBC API Specification 4.2.The jars in the 7.4 package are named according to Java version compatibility.
For example, the mssql-jdbc-7.4.1.jre11.jar file from the 7.4 package should be used with Java 11.
Compatible with Java Development Kit (JDK) version 12.0, 11.0, and 1.8.Microsoft JDBC Driver 7.4 for SQL Server is now compatible with Java Development Kit (JDK) version 12.0 in addition to JDK 11.0 and 1.8.

Support for JDK 12

Microsoft JDBC Driver 7.4 for SQL Server is now compatible with Java Development Kit (JDK) version 12.0 in addition to JDK 11.0 and 1.8.

Introduces NTLM authentication

NTLM changeDetails
Supports NTLM authentication mode.This mode of authentication allows both Windows and non-Windows clients to authenticate themselves against SQL Server using Windows domain users.
More details and a sample application to use this authentication mode.See Connecting using NTLM Authentication.

Introduces querying ParameterMetaData via useFmtOnly

useFmtOnly changeDetails
useFmtOnly connection property added.This feature allows users to optionally query ParameterMetaData via the SET FMTONLY ON legacy API. This is useful for scenarios where sp_describe_undeclared_parameters doesn't perform as expected.
More details and limitations.See Using useFmtOnly

Updated Microsoft Azure Key Vault SDK for Java, version 1.2.1

Key Vault SDK changeDetails
Updated its Maven dependency on Microsoft Azure Key Vault SDK for Java to version 1.2.1.
Removes Microsoft Azure SDK for Key Vault WebKey as a Maven dependency.
Additional details.See Feature dependencies of the Microsoft JDBC Driver for SQL Server.

Known issues

Known issuesDetails
When using NTLM Authentication.Enabling Extended Protection and encrypted connections at the same time is currently not supported.
When using useFmtOnly.There are some issues with the feature, which are caused by deficiencies in SQL parsing logic. See Using useFmtOnly for more details and workaround suggestions.

7.2.2

Compliance

April 16, 2019

Compliance changeDetails
Download the latest updates for JDBC Driver 7.2.• Microsoft Download Center
• GitHub, 7.2.2
• Maven Central
Fully compliant with JDBC API Specification 4.2.The jars in the 7.2 package are named according to Java version compatibility.
For example, the mssql-jdbc-7.2.2.jre11.jar file from the 7.2 package should be used with Java 11.
Compatible with Java Development Kit (JDK) version 11.0 in addition to JDK 1.8.Microsoft JDBC Driver 7.2 for SQL Server is now compatible with Java Development Kit (JDK) version 11.0 in addition to JDK 1.8.

/download-stainless-steel-62-patch.html. Note

An issue with SQL statement parsing was found in the JDBC 7.2 Release To Web (RTW) driver released on January 31, 2019. The change was rolled back, and new jars (version 7.2.1) were released on February 11, 2019.

Another update was made on the driver to fix issues with ActivityIDs not getting cleaned up properly. The new jars (version 7.2.2) were released on April 16, 2019.

We recommend updating your projects to use the 7.2.2 release jars. For more information, view release notes for GitHub, 7.2.1 and GitHub, 7.2.2.

Active Directory Managed Service Identity (MSI) authentication

MSI changeDetails
Supports Active Directory Managed Service Identity (MSI) authentication mode.This mode of authentication is applicable on Azure Resources with support for 'Identity' feature enabled.
Both types of Managed System Identities (MSI) are supported by the driver to acquire accessToken for establishing secure connection.
More details and a sample application to use this authentication mode.See Connecting using Azure Active Directory Authentication.

Introduces Open Service Gateway Initiative (OSGi) support

OSGi changeDetails
DataSourceFactory implementation added.org.osgi.service.jdbc.DataSourceFactory
com.microsoft.sqlserver.jdbc.osgi.SQLServerDataSourceFactory
Activator implementation added.org.osgi.framework.BundleActivator
com.microsoft.sqlserver.jdbc.osgi.Activator

Introduces SQLServerError APIs

Error API changeDetails
SQLServerError API introduced.Getter APIs to retrieve additional details about the error generated from the server.
SQLServerException.getSQLServerError()
SQLServerError
Additional details.See Handling Errors.

Updated Microsoft Azure Active Directory Authentication Library (ADAL4J) for Java, version 1.6.3

ADAL4J changeDetails
Updated its Maven dependency on ADAL4J to version 1.6.3.
Introduces Java Client Runtime for AutoRest as a Maven dependency, version 1.6.5.
Additional details.See Feature dependencies of the Microsoft JDBC Driver for SQL Server.

Updated Microsoft Azure Key Vault SDK for Java, version 1.2.0

Key Vault SDK changeDetails
Updated its Maven dependency on Microsoft Azure Key Vault SDK for Java to version 1.2.0.
Introduces Microsoft Azure SDK for Key Vault WebKey as a Maven dependency, version 1.2.0.
Additional details.See Feature dependencies of the Microsoft JDBC Driver for SQL Server.

Known Issues

Known issuesDetails
Parameterized queries, in certain cases.An update of the 7.2.0 version, v7.2.1, was released in February 2019 to address this issue.
Cleaning up of ActivityIds.An update of the 7.2.1 version, v7.2.2, was released in April 2019 to address this issue.

7.0

Microsoft JDBC Driver 7.0 for SQL Server is fully compliant with JDBC API Specification 4.2. The jars in the 7.0 package are named according to Java version compatibility. For example, the mssql-jdbc-7.0.0.jre10.jar file from the 7.0 package should be used with Java 10.

Support for JDK 10

Microsoft JDBC Driver 7.0 for SQL Server is now compatible with Java Development Kit (JDK) version 10.0 in addition to JDK 1.8. This update also exposes the driver's Automatic-Module-Name as com.microsoft.sqlserver.jdbc through its MANIFEST file.

Microsoft Sql Server Jdbc Download

Support for spatial datatypes

Microsoft JDBC Driver 7.0 for SQL Server now provides support for SQL Server spatial datatypes Geography and Geometry. For more information about spatial datatype APIs and how to use them, see Using spatial datatypes.

Implementation for JDBC 4.3 introduced java.sql.Connection APIs beginRequest() and endRequest()

Microsoft JDBC Driver 7.0 for SQL Server now implements beginRequest() and endRequest() APIs from the java.sql.Connection class. These APIs were introduced with JDBC 4.3 specifications and JDK 9. For more information about the driver's implementation of these APIs, see JDBC 4.3 compliance for the JDBC Driver.

Support for SQL Data Discovery and Classification

Microsoft JDBC Driver 7.0 for SQL Server provides support for SQL Data Discovery and Classification with any target database that supports this feature. The driver now exposes SQLServerResultSet.getSensitivityClassification() APIs to extract this information from the fetched ResultSet.

For more information about how to use this feature with the JDBC Driver, see the sample in SQL Data Discovery and Classification.

Added connection property: useBulkCopyForBatchInsert

Microsoft JDBC Driver 7.0 for SQL Server introduces a new connection property, useBulkCopyForBatchInsert. This property is supported only for Azure SQL Data Warehouse.

This property is disabled by default. You can enable it to increase performance of user applications when you're pushing large amounts data to Azure SQL Data Warehouse. Enabling this property changes the behavior of batch insert operations to switch to bulk copy operations with user-provided data. For more information about this property and its limitations, see Using Bulk Copy API for batch insert operation.

Added connection property: cancelQueryTimeout

Microsoft JDBC Driver 7.0 for SQL Server introduces a new connection property, cancelQueryTimeout, to cancel queryTimeout on java.sql.Connection and java.sql.Statement objects.

Added Azure Key Vault Provider constructors

Microsoft JDBC Driver 7.0 for SQL Server reintroduces a previously removed constructor, for SQLServerColumnEncryptionAzureKeyVaultProvider. It allowed authentication through a custom method implemented over SQLServerKeyVaultAuthenticationCallback to fetch an access token.

The new constructors have the following definition:

Updated 'Microsoft Azure Active Directory Authentication Library (ADAL4J) for Java' version: 1.6.0

Microsoft JDBC Driver 7.0 for SQL Server has updated its Maven dependency on 'Microsoft Azure Active Directory Authentication Library (ADAL4J) for Java' to version 1.6.0. For more information about dependencies, see Feature dependencies of the Microsoft JDBC Driver for SQL Server.

6.4

Microsoft JDBC Driver 6.4 for SQL Server is fully compliant with JDBC specifications 4.1 and 4.2. The jars in the 6.4 package are named according to Java version compatibility. For example, the mssql-jdbc-6.4.0.jre8.jar file from the 6.4 package must be used with Java 8.

Support for JDK 9

The driver supports JDK version 9.0 in addition to JDK 8.0 and 7.0.

JDBC 4.3 compliance

The driver supports the Java Database Connectivity API 4.3 specification, in addition to 4.1 and 4.2. The JDBC 4.3 API methods are added but not implemented yet. For details, see JDBC 4.3 compliance for the JDBC Driver.

Added connection property: sslProtocol

A new connection property lets users specify the TLS protocol keyword. Possible values are: 'TLS', 'TLSv1', 'TLSv1.1', and 'TLSv1.2'. For details, see SSLProtocol.

Deprecated connection property: fipsProvider

The connection property fipsProvider is removed from the list of accepted connection properties. For details, see the related GitHub pull request.

Added connection properties for specifying a custom TrustManager

The driver now supports specifying a custom TrustManager with added trustManagerClass and trustManagerConstructorArg connection properties. You can dynamically specify a set of certificates that are trusted on a per-connection basis without modifying the global settings for the Java virtual machine (JVM) environment.

Added support for datetime/smallDatetime in table-valued parameters

The driver now supports the datatypes datetime and smallDatetime when you're using table-valued parameters (TVPs).

Added support for the sql_variant datatype

The JDBC Driver now supports sql_variant datatypes to be used with SQL Server. The sql_variant datatype is also supported with features such as TVPs and bulk copy with the following limitations:

  • For date values:

    When you're using a TVP to populate a table that contains datetime, smalldatetime, or date values stored in a sql_variant column, calling the getDateTime(), getSmallDateTime(), or getDate() method on the result set doesn't work and throws the following exception:

    java java.lang.String cannot be cast to java.sql.Timestamp

    As a workaround, use the getString() or getObject() method instead.

  • Using a TVP with sql_variant for null values:

    If you're using a TVP to populate a table and send a NULL value to the sql_variant column type, you'll encounter an exception. Inserting a NULL value with the column type sql_variant in a TVP is currently not supported.

Implemented prepared statement metadata caching

The JDBC Driver has implemented prepared statement metadata caching for performance improvement. The driver now supports caching prepared statement metadata in the driver with disableStatementPooling and statementPoolingCacheSize connection properties. This feature is disabled by default. For more information, see Prepared statement metadata caching for the JDBC Driver.

Added support for Azure AD Integrated Authentication on Linux/Mac

The JDBC Driver now supports Azure Active Directory (Azure AD) Integrated Authentication on all supported operating systems (Windows, Linux, and Mac) with Kerberos. Alternatively, on Windows operating systems, users can authenticate with sqljdbc_auth.dll.

Updated 'Microsoft Azure Active Directory Authentication Library (ADAL4J) for Java' version: 1.4.0

The JDBC Driver has updated its Maven dependency on 'Microsoft Azure Active Directory Authentication Library (ADAL4J) for Java' to version 1.4.0. For more information about dependencies, see Feature dependencies of the Microsoft JDBC Driver for SQL Server.

6.2

Microsoft JDBC Driver 6.2 for SQL Server is fully compliant with JDBC specifications 4.1 and 4.2. The jars in the 6.2 package are named according to Java version compatibility. For example, the mssql-jdbc-6.2.2.jre8.jar file from the 6.2 package is recommended for use with Java 8.

Note

An issue with the metadata caching improvement was found in the JDBC 6.2 RTW released on June 29, 2017. The improvement was rolled back and new jars (version 6.2.1) were released on July 17, 2017.

Another improvement upgraded the Azure Key Vault dependent library version to 1.0.0, and new jars (version 6.2.2) were released on October 19, 2017.

Download the latest updates for JDBC Driver 6.2 from Microsoft Download Center, GitHub, and Maven Central. Please update your projects to use the 6.2.2 release jars. For more information, view release notes for 6.2.1 and 6.2.2.

Sql Server 2008 Jdbc Driver

Azure AD support for Linux

Connect your Linux applications to Azure SQL Database by using Azure AD authentication via username/password and access token methods.

FIPS-enabled JVMs

The JDBC Driver can now be used on JVMs that run in Federal Information Processing Standard (FIPS) 140 compliance mode to meet federal standards on compliance.

Kerberos authentication improvements

The JDBC Driver now has support for:

  • Principal/password method for applications where the Kerberos configuration can't be modified or can't retrieve a new token or keytab. This method can be used for authenticating to a SQL Server instance that allows only Kerberos authentication.
  • Cross-realm authentication that uses Kerberos Integrated Authentication without explicitly setting the server SPN. The driver now automatically computes the realm even when it isn't provided.
  • Kerberos Constrained Delegation by accepting impersonated user credentials as a GSS credential object via data source. This impersonated credential is then used to establish a Kerberos connection.

Added timeouts

The JDBC Driver now supports the following configurable timeouts. You can change them based on your application’s needs.

  • Query timeout to control the number of seconds to wait before a timeout occurs when you're running a query.
  • Socket timeout to specify the number of milliseconds to wait before a timeout occurs on a socket read or accept.

6.1

Microsoft JDBC Driver 6.1 for SQL Server is fully compliant with JDBC specifications 4.1 and 4.2. This is the initial open-source release of the JDBC Driver. It contains the mssql-jdbc-6.1.0.jre8.jar and mssql-jdbc-6.1.0.jre7.jar files, which correspond to Java version compatibility.

6.0

Microsoft JDBC Driver 6.0 for SQL Server is fully compliant with JDBC specifications 4.1 and 4.2. The jars in the 6.0 package are named according to their compliance with the JDBC API version. For example, the sqljdbc42.jar file from the 6.0 package is JDBC API 4.2 compliant. Similarly, the sqljdbc41.jar file is compliant with JDBC API 4.1.

To ensure that you have the right sqljdbc42.jar or sqljdbc41.jar file, run the following lines of code. If the output is 'Driver version: 6.0.7507.100', you have the JDBC Driver 6.0 package.

Always Encrypted

The driver supports the Always Encrypted feature in SQL Server 2016. This feature ensures that sensitive data is never seen in plaintext in a SQL Server instance. Always Encrypted works by transparently encrypting the data in the application, so that SQL Server will handle only the encrypted data and not plaintext values. Even if the SQL Server instance or the host machine is compromised, all an attacker can get is ciphertext of sensitive data. For details, see Using Always Encrypted with the JDBC Driver.

Internationalized domain names

The driver supports internationalized domain names (IDNs) for server names. For details, see 'Using International Domain Names' in the International features of the JDBC Driver article.

Parameterized queries

The driver now supports retrieving parameter metadata with prepared statements for complex queries, such as subqueries and/or joins. Note that this improvement is available only when you're using SQL Server 2012 and newer versions.

Azure Active Directory

Azure AD authentication is a mechanism of connecting to Azure SQL Database v12 by using identities in Azure AD. Use Azure AD authentication to centrally manage identities of database users and as an alternative to SQL Server authentication.

You can use JDBC Driver 6.0 to specify your Azure AD credentials in the JDBC connection string to connect to Azure SQL Database. For details, see the authentication property in the Setting the connection properties article.

Table-valued parameters

TVPs provide an easy way to marshal multiple rows of data from a client application to SQL Server without requiring multiple round trips or special server-side logic for processing the data. You can use TVPs to encapsulate rows of data in a client application and send the data to the server in a single parameterized command. The incoming data rows are stored in a table variable that you can then operate on by using Transact-SQL. For details, see Using table-valued parameters.

Always On Availability Groups

The driver now supports transparent connections to Always On Availability Groups. The driver quickly discovers the current Always On topology of your server infrastructure and connects to the current active server transparently.

4.2

Microsoft JDBC Driver 4.2 for SQL Server is fully compliant with JDBC specifications 4.1 and 4.2. The jars in the 4.2 package are named according to their compliance with the JDBC API version. For example, the sqljdbc42.jar file from the 4.2 package is JDBC API 4.2 compliant. Similarly, the sqljdbc41.jar file is compliant with JDBC API 4.1.

To ensure you have the right sqljdbc42.jar or sqljdbc41.jar file, run the following lines of code. If the output is 'Driver version: 4.2.6420.100', you have the JDBC Driver 4.2 package.

Support for JDK 8

The driver supports JDK version 8.0 in addition to JDK 7.0, 6.0, and 5.0.

JDBC 4.1 and 4.2 compliance

Microsoft Sql Server Jdbc Driver Download

The driver supports Java Database Connectivity API 4.1 and 4.2 specifications, in addition to 4.0. For details, see JDBC 4.1 compliance for the JDBC Driver and JDBC 4.2 compliance for the JDBC Driver.

Bulk copy

You use the bulk copy feature to quickly copy large amounts of data into tables or views in SQL Server databases. For details, see Using bulk copy with the JDBC Driver.

XA transaction rollback option

The driver has new timeout options for existing automatic rollback of unprepared transactions. For details, see Understanding XA transactions.

New Kerberos principal connection property

Jdbc Driver Sql Server 2017

The driver uses a new connection property to facilitate flexibility with Kerberos connections. For details, see Using Kerberos Integrated Authentication to connect to SQL Server.

4.1

Support for JDK 7

Sql Server Jdbc Connection String

The driver supports JDK version 7.0 in addition to JDK 6.0 and 5.0.

Itanium not supported for JDBC Driver 6.4, 6.0, 4.2, and 4.1 applications

Microsoft Sql Server Jdbc For Java

Microsoft JDBC Drivers 6.4, 6.0, 4.2, and 4.1 for SQL Server applications aren't supported to run on an Itanium computer.

Open Jdbc Driver 6 Download

See also