- Microsoft Sql Server Jdbc Driver
- Sql Server Jdbc Driver Download
- Microsoft Sql Server Jdbc Driver 4.0
- Sql Server Jdbc Driver 6.4
- Sql Server Jdbc Driver Latest Version
Microsoft SQL Server JDBC Driver is one of the solutions they can rely to, as it can offer database connectivity between SQL servers and Java-based products. Additionally, this driver supports a. Downloading and using the Microsoft JDBC Driver 4.0 for SQL Server signifies acceptance of this license. Download the sqljdbc__enu.exe to a temporary directory. Microsoft jdbc driver 4 0 for sql server free download - Microsoft JDBC Driver 4.0 for SQL Server CTP2, SQL Server 7.0 Service Pack 4, Microsoft SQL Server 2008 Express (64-bit), and many more.
Welcome to the Microsoft JDBC Driver for SQL Server project!
The Microsoft JDBC Driver for SQL Server is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in the Java Platform, Enterprise Editions. The Driver provides access to Microsoft SQL Server and Azure SQL Database from any Java application, application server, or Java-enabled applet.
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.
We hope you enjoy using the Microsoft JDBC Driver for SQL Server.
SQL Server Team
Take our survey
Let us know how you think we're doing.
Status of Most Recent Builds
Azure Pipelines (Windows) | Azure Pipelines (Linux) | Azure Pipelines (MacOS) |
---|
Announcements
What's coming next? We will look into adding a more comprehensive set of tests, improving our javadocs, and start developing the next set of features.
Get Started
Build
Prerequisites
- Java 11+
- An instance of SQL Server or Azure SQL Database that you can connect to.
Build the JAR files
Maven builds automatically trigger a set of verification tests to run. For these tests to pass, you will first need to add an environment variable in your system called
mssql_jdbc_test_connection_properties
to provide the correct connection properties for your SQL Server or Azure SQL Database instance.To build the jar files, you must use minimum version of Java 11 with Maven. You may choose to build JDBC 4.3 compliant jar file (for use with JRE 11 or newer JRE versions) and/or a JDBC 4.2 compliant jar file (for use with JRE 8).
- Maven:
- If you have not already done so, add the environment variable
mssql_jdbc_test_connection_properties
in your system with the connection properties for your SQL Server or SQL DB instance. - Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the
target
directory.- Run
mvn install -Pjre12
. This creates JRE 12 compatible jar intarget
directory which is JDBC 4.3 compliant (Build with JDK 12+). - Run
mvn install -Pjre11
. This creates JRE 11 compatible jar intarget
directory which is JDBC 4.3 compliant (Build with JDK 11+). - Run
mvn install -Pjre8
. This creates JRE 8 compatible jar intarget
directory which is JDBC 4.2 compliant (Build with JDK 11+).
- Run
- If you have not already done so, add the environment variable
- Gradle:
- If you have not already done so, add the environment variable
mssql_jdbc_test_connection_properties
in your system with the connection properties for your SQL Server or SQL DB instance. - Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the
buildlibs
directory.- Run
gradle build -PbuildProfile=jre12
. This creates JRE 12 compatible jar inbuildlibs
directory which is JDBC 4.3 compliant (Build with JDK 12+). - Run
gradle build -PbuildProfile=jre11
. This creates JRE 11 compatible jar inbuildlibs
directory which is JDBC 4.3 compliant (Build with JDK 11+). - Run
gradle build -PbuildProfile=jre8
. This creates JRE 8 compatible jar inbuildlibs
directory which is JDBC 4.2 compliant (Build with JDK 11+).
- Run
- If you have not already done so, add the environment variable
Resources
Documentation
API reference documentation is available in Javadocs.
This driver is documented on Microsoft's Documentation web site.
Sample Code
For samples, please see the
srcsample
directory.Download the DLLs
For some features (e.g. Integrated Authentication and Distributed Transactions), you may need to use the
sqljdbc_xa
and sqljdbc_auth
DLLs. They can be downloaded from the Microsoft Download CenterDownload the driver
Don't want to compile anything?
We're now on the Maven Central Repository. Add the following to your POM file to get the most stable release: Garmin usb drivers windows 10.
The driver can be downloaded from the Microsoft Download Center.
To get the latest preview version of the driver, add the following to your POM file:
Using driver as Java Module
Starting from version 7.0.0, the driver Jars (jre10 and above) will expose 'Automatic-Module' as 'com.microsoft.sqlserver.jdbc'. The supporting Jar can now be added to ModulePath to access this module.
Dependencies
This project has following dependencies:
Compile Time:
com.microsoft.azure:azure-keyvault
: Azure Key Vault Provider for Always Encrypted Azure Key Vault feature (optional)com.microsoft.azure:azure-keyvault-webkey
: Azure Key Vault Provider for Always Encrypted Azure Key Vault feature (optional)com.microsoft.azure:adal4j
: Azure Active Directory Library for Java for Azure Active Directory Authentication feature and Azure Key Vault feature (optional)com.microsoft.rest:client-runtime
: Azure Active Directory Library for Java for Azure Active Directory Authentication feature and Azure Key Vault feature (optional)
Test Time:
junit:jar
: For Unit Test cases.
![Server Server](/uploads/1/3/3/2/133281942/971671387.png)
Dependency Tree
One can see all dependencies including Transitive Dependency by executing following command.
Azure Key Vault and Azure Active Directory Authentication Dependencies
Projects that require either of the two features need to explicitly declare the dependency in their pom file.
For Example: If you are using Azure Active Directory Authentication feature then you need to redeclare adal4j and client-runtime dependency in your project's POM file. Please see the following snippet:
For Example: If you are using Azure Key Vault feature then you need to redeclare azure-keyvault, azure-keyvault-webkey dependency and adal4j, client-runtime dependency in your project's POM file. Please see the following snippet:
Please note as of the v6.2.2, the way to construct a
SQLServerColumnEncryptionAzureKeyVaultProvider
object has changed. Please refer to this Wiki page for more information.'useFmtOnly' connection property Dependencies
When setting 'useFmtOnly' property to 'true' for establishing a connection or creating a prepared statement, antlr-runtime dependency is required to be added in your project's POM file. Please see the following snippet:
Guidelines for Creating Pull Requests
We love contributions from the community. To help improve the quality of our code, we encourage you to use the mssql-jdbc_formatter.xml formatter provided on all pull requests.
Thank you!
Guidelines for Reporting Issues
We appreciate you taking the time to test the driver, provide feedback and report any issues. It would be extremely helpful if you:
- Report each issue as a new issue (but check first if it's already been reported)
- Try to be detailed in your report. Useful information for good bug reports include:
- What you are seeing and what the expected behavior is
- Which jar file?
- Environment details: e.g. Java version, client operating system?
- Table schema (for some issues the data types make a big difference!)
- Any other relevant information you want to share
- Try to include a Java sample demonstrating the isolated problem.
Thank you!
Reporting security issues and security bugs
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.
Release roadmap and standards
Our goal is to release regular updates which improve the driver and bring new features to users. Stable, production quality releases happen twice a year, targeting the first and third quarters of the calendar year. They are tested against a comprehensive matrix of supported operating systems, Java versions, and SQL Server versions. Stable releases are accompanied by additional localized packages, which are available on the Microsoft website.
Preview releases happen approximately monthly between stable releases. This gives users an opportunity to try out new features and provide feedback on them before they go into stable releases. Preview releases also include frequent bug fixes for customers to verify without having to wait for a stable release. Preview releases are only available in English. While they are tested, preview releases do not necessarily go through the same rigorous, full test matrix and review process as stable releases.
You can see what is going into a future release by monitoring Milestones in the repository.
Version conventions
Starting with 6.0, stable versions have an even minor version. For example, 6.0, 6.2, 6.4, 7.0, 7.2, 7.4. Preview versions have an odd minor version. For example, 6.1, 6.3, 6.5, 7.1, 7.3, and so on
Contributors
Special thanks to everyone who has contributed to the project.
Up-to-date list of contributors: https://github.com/Microsoft/mssql-jdbc/graphs/contributors
Here are our Top 15 contributors from the community:
- pierresouchay (Pierre Souchay)
- marschall (Philippe Marschall)
- JamieMagee (Jamie Magee)
- sehrope (Sehrope Sarkuni)
- gordthompson (Gord Thompson)
- simon04 (Simon Legner)
- gstojsic
- cosmofrit
- rPraml (Roland Praml)
- nsidhaye (Nikhil Sidhaye)
- tonytamwk
- shayaantx
- mnhubspot
- mfriesen (Mike Friesen)
- harawata (Iwao AVE!)
License
The Microsoft JDBC Driver for SQL Server is licensed under the MIT license. See the LICENSE file for more details.
Code of conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
-->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.
Microsoft Sql Server Jdbc Driver
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:
JAR | JDBC Version Compliance | Recommended Java Version | Description |
---|---|---|---|
mssql-jdbc-7.4.1.jre8.jar | 4.2 | 8 | Requires 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.jar | 4.3 | 11 | Requires 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.jar | 4.3 | 12 | Requires 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:
JAR | JDBC Version Compliance | Recommended Java Version | Description |
---|---|---|---|
mssql-jdbc-7.2.2.jre8.jar | 4.2 | 8 | Requires 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.jar | 4.3 | 10 | Requires 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:
JAR | JDBC Version Compliance | Recommended Java Version | Description |
---|---|---|---|
mssql-jdbc-7.0.0.jre8.jar | 4.2 | 8 | Requires 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.jar | 4.3 | 10 | Requires 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:
JAR | JDBC Version Compliance | Recommended Java Version | Description |
---|---|---|---|
mssql-jdbc-6.4.0.jre7.jar | 4.1 | 7 | Requires 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.jar | 4.2 | 8 | Requires 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.jar | 4.3 | 9 | Requires 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.
Sql Server Jdbc Driver Download
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:
JAR | JDBC Version Compliance | Recommended Java Version | Description |
---|---|---|---|
mssql-jdbc-6.2.2.jre7.jar | 4.1 | 7 | Requires 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.jar | 4.2 | 8 | Requires 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:
Cricket 7 game download. 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:
JAR | JDBC Version Compliance | Recommended Java Version | Description |
---|---|---|---|
sqljdbc41.jar | 4.1 | 7 | Requires 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.jar | 4.2 | 8 | Requires 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.
JAR | Description |
---|---|
sqljdbc41.jar | sqljdbc41.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. |
Microsoft Sql Server Jdbc Driver 4.0
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.
Sql Server Jdbc Driver 6.4
The following summarizes support provided by the JAR file included with Microsoft JDBC Driver 4.1 for SQL Server.
JAR | JDBC Version | JRE (can run) | JDK (can compile) |
---|---|---|---|
sqljdbc41.jar | 4 | 7 | 7 6 5 |
SQL Server requirements
Sql Server Jdbc Driver Latest Version
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. Xbox 360 usb modding tool download. 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.