mssql-jdbc

(โ˜… 1,130)

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).

  • .checkstyle
  • .gitattributes
  • .gitignore
  • AGENTS.md
  • build.gradle
  • CHANGELOG.md
  • CODE_OF_CONDUCT.md
  • coding-best-practices.md
  • Coding_Guidelines.md
  • CONTRIBUTING.md
  • LICENSE
  • maven-version-rules.xml
  • mssql-jdbc-checkstyle.xml
  • mssql-jdbc_auth_LICENSE
  • mssql-jdbc_formatter.xml
  • pom.xml
  • README.md
  • review-process.md
  • SECURITY.md

# Installation Guide

1. Get the code
git clone https://github.com/microsoft/mssql-jdbc

Downloads the entire project code from GitHub to your computer.

cd mssql-jdbc

Moves into the project folder you just downloaded.

2. Maven (Java)

Medium Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • JDK (Java) Required to build and run Java projects.
  • Maven The build tool used for the mvn command.
* Run `mvn install -Pjre26`. This creates JRE 26 compatible jar in `\target` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 26.

Installs dependencies and builds the project using Maven.

* Run `mvn install -Pjre25`. This creates JRE 25 compatible jar in `\target` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 25.

Installs dependencies and builds the project using Maven.

* Run `mvn install -Pjre21`. This creates JRE 21 compatible jar in `\target` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 21+.

Installs dependencies and builds the project using Maven.

* Run `mvn install -Pjre17`. This creates JRE 17 compatible jar in `\target` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 17+.

Installs dependencies and builds the project using Maven.

* Run `mvn install -Pjre11`. This creates JRE 11 compatible jar in `\target` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 11+.

Installs dependencies and builds the project using Maven.

โœ… A BUILD SUCCESS message means it worked. The output is created under target/.

Pulled directly from this repo's README.

3. Gradle (Java/Kotlin)

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • JDK (Java) Required to build and run Java/Kotlin projects.
  • Gradle If the repo includes gradlew (Gradle Wrapper), you don't need to install Gradle separately.
* Run `gradle build -PbuildProfile=jre26`. This creates JRE 26 compatible jar in `\build\libs` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 26.

Builds the project using Gradle.

* Run `gradle build -PbuildProfile=jre25`. This creates JRE 25 compatible jar in `\build\libs` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 25.

Builds the project using Gradle.

* Run `gradle build -PbuildProfile=jre21`. This creates JRE 21 compatible jar in `\build\libs` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 21+.

Builds the project using Gradle.

* Run `gradle build -PbuildProfile=jre17`. This creates JRE 17 compatible jar in `\build\libs` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 17+.

Builds the project using Gradle.

* Run `gradle build -PbuildProfile=jre11`. This creates JRE 11 compatible jar in `\build\libs` directory built against the JDBC 4.3 API with partial support (see the [support matrix](https://learn.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix#java-and-jdbc-specification-support)). Build with JDK 11+.

Builds the project using Gradle.

โœ… A BUILD SUCCESSFUL message means it worked. The output is created under build/.

Pulled directly from this repo's README.

// repository documentation