RepoMicrosoftMicrosoftpublished Aug 22, 2016seen 2d

microsoft/mssql-jdbc

Java

Open original ↗

Captured source

source ↗
published Aug 22, 2016seen 2dcaptured 13hhttp 200method plain

microsoft/mssql-jdbc

Description: The Microsoft JDBC Driver for SQL Server is a Type 4 JDBC driver that provides database connectivity with SQL Server through the standard JDBC application program interfaces (APIs).

Language: Java

License: MIT

Stars: 1128

Forks: 468

Open issues: 105

Created: 2016-08-22T21:58:47Z

Pushed: 2026-06-10T07:48:15Z

Default branch: main

Fork: no

Archived: no

README: ![Maven Central](http://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc) ![Javadocs](http://javadoc.io/doc/com.microsoft.sqlserver/mssql-jdbc)

Microsoft JDBC Driver for SQL Server

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.

Releases can be found on the GitHub Releases page, in the Microsoft JDBC Documentation, or via Maven. Starting from preview release 12.1.0, each release contains two versions of the driver. One for use with Java 8 (jre8), and one for use with version Java 11 and above (jre11).

We hope you enjoy using the Microsoft JDBC Driver for SQL Server.

Microsoft JDBC driver for 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) | |--------------------------|--------------------------|--------------------------| | ![Build Status](https://sqlclientdrivers.visualstudio.com/public/_build/latest?definitionId=825&branchName=main) | ![Build Status](https://sqlclientdrivers.visualstudio.com/public/_build/latest?definitionId=823&branchName=main) | ![Build Status](https://sqlclientdrivers.visualstudio.com/public/_build/latest?definitionId=824&branchName=main) |

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

**Getting started with SQL Server and Java**

Build

Prerequisites

  • Java 11+
  • Maven 3.5.0+
  • 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:

1. 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. 2. 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 -Pjre26. This creates JRE 26 compatible jar in \target directory which is JDBC 4.3 compliant (Build with JDK 26).
  • Run mvn install -Pjre25. This creates JRE 25 compatible jar in \target directory which is JDBC 4.3 compliant (Build with JDK 25).
  • Run mvn install -Pjre21. This creates JRE 21 compatible jar in \target directory which is JDBC 4.3 compliant (Build with JDK 21+).
  • Run mvn install -Pjre17. This creates JRE 17 compatible jar in \target directory which is JDBC 4.3 compliant (Build with JDK 17+).
  • Run mvn install -Pjre11. This creates JRE 11 compatible jar in \target directory which is JDBC 4.3 compliant (Build with JDK 11+).
  • Run mvn install -Pjre8. This creates JRE 8 compatible jar in \target directory which is JDBC 4.2 compliant (Build with JDK 11+).
  • Gradle:

1. 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. 2. Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the \build\libs directory.

  • Run gradle build -PbuildProfile=jre26. This creates JRE 26 compatible jar in \build\libs directory which is JDBC 4.3 compliant (Build with JDK 26).
  • Run gradle build -PbuildProfile=jre25. This creates JRE 25 compatible jar in \build\libs directory which is JDBC 4.3 compliant (Build with JDK 25).
  • Run gradle build -PbuildProfile=jre21. This creates JRE 21 compatible jar in \build\libs directory which is JDBC 4.3 compliant (Build with JDK 21+).
  • Run gradle build -PbuildProfile=jre17. This creates JRE 17 compatible jar in \build\libs directory which is JDBC 4.3 compliant (Build with JDK 17+).
  • Run gradle build -PbuildProfile=jre11. This creates JRE 11 compatible jar in \build\libs directory which is JDBC 4.3 compliant (Build with JDK 11+).
  • Run gradle build -PbuildProfile=jre8. This creates JRE 8 compatible jar in \build\libs directory which is JDBC 4.2 compliant (Build with JDK 11+).

Resources

Documentation

API reference documentation is available in Javadocs.

This driver is documented on Microsoft Docs.

Sample…

Excerpt shown — open the source for the full document.