Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

18,360

Downloads of v 11.2.0.0:

1,319

Last Update:

11 Aug 2022

Package Maintainer(s):

Software Author(s):

  • Microsoft

Tags:

sql sql-server java jdbc microsoft

Microsoft JDBC Driver for SQL Server

  • 1
  • 2
  • 3

11.2.0.0 | Updated: 11 Aug 2022

Downloads:

18,360

Downloads of v 11.2.0.0:

1,319

Maintainer(s):

Software Author(s):

  • Microsoft

Microsoft JDBC Driver for SQL Server 11.2.0.0

Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by Microsoft. The inclusion of Microsoft trademark(s), if any, upon this webpage is solely to identify Microsoft goods or services and not for commercial purposes.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Failed

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Microsoft JDBC Driver for SQL Server, run the following command from the command line or from PowerShell:

>

To upgrade Microsoft JDBC Driver for SQL Server, run the following command from the command line or from PowerShell:

>

To uninstall Microsoft JDBC Driver for SQL Server, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade sqljdbc -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade sqljdbc -y --source="'INTERNAL REPO URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install sqljdbc
  win_chocolatey:
    name: sqljdbc
    version: '11.2.0.0'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'sqljdbc' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '11.2.0.0'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller sqljdbc
{
    Name     = "sqljdbc"
    Version  = "11.2.0.0"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'sqljdbc':
  ensure   => '11.2.0.0',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Package Approved

This package was approved as a trusted package on 11 Aug 2022.

Description

Java Database Connectivity (JDBC) driver for use with SQL Server, and Azure SQL Database. The driver is available at no
extra charge and provides Java database connectivity from any Java application, application server, or Java-enabled
applet. This driver is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application
program interfaces (APIs).

The Microsoft JDBC Driver for SQL Server has been tested against major application servers such as IBM WebSphere, and
SAP NetWeaver.

Package Parameters

The Languages package parameter can be set to install the package with the specified language. If no language is
specified the install will default to English.

Multiple languages can be installed by providing a comma-separated list of language codes.

  • /Languages=[language-codes] - installs the package using the specified languages. The languages must be supplied
    as a comma-separated listSupported languages are:
Language Code Mapping Parameters
Brazilian (Portuguese) br ptb --params "/Languages=br"
German de deu --params "/Languages=de"
English en enu --params "/Languages=en"
Spanish es esn --params "/Languages=es"
French fr fra --params "/Languages=fr"
Italian it ita --params "/Languages=it"
Japanese ja jpn --params "/Languages=ja"
Korean ko kor --params "/Languages=ko"
Russian ru rus --params "/Languages=ru"
Chinese (Simplified) zh chs --params "/Languages=zh"
Chinese (Simplified) zh-CN chs --params "/Languages=zh-CN"
Chinese (Traditional) zh-TW cht --params "/Languages=zh-TW"

For example: choco install sqljdbc --params "/Languages=en,fr" to install the English and French versions of the driver

  • /InstallDir - sets the directory in which to install sqljdbc. The installation defaults to the system
    directory [Environment]::GetFolderPath('ProgramFiles')\Microsoft JDBC DRIVER for SQL Server
  • /User - override the default installation directory and install the driver in the user directory
    [Environment]::GetFolderPath('Programs')\Microsoft JDBC DRIVER for SQL Server

To have Chocolatey remember parameters on upgrade, be sure to set choco feature enable -n=useRememberedArgumentsForUpgrades.

Notes

  • The drivers will be installed under [InstallDir]\sqljdbc_X.Y\[LanguageMaping] where X.Y represents the
    Major.Minor versions of the package and LanguageMapping is the sub directory representing the mapping for
    the default (English - enu) or other specified languages
  • This package is automatically updated using the Chocolatey Automatic Package Update Model (AU).
    If you find it is out of date by more than a day or two, please contact the maintainer(s) and let them know the package is no longer updating correctly.

tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'

add-type @"
public struct Language {
   public string Name;
   public string Mapping;
   public string Checksum;
}
"@

$languageDefinitions =  @{
    'br'    = [Language] @{ Name = 'Brazilian (Portuguese)'; Mapping = 'ptb'; Checksum = '07082162fa8dc89ce89c6a046b3a4cba908a5dacf130470d258bcb648113fe08' }
    'de'    = [Language] @{ Name = 'German';                 Mapping = 'deu'; Checksum = '046309a94baad6a942c6b8235aabf7aa0357baee5f7ec490b5e4ce4d2da8064b' }
    'en'    = [Language] @{ Name = 'English';                Mapping = 'enu'; Checksum = 'd87979856f1d7e753cbb873e534d2e02e2040df03e9f90592ad7a0b3ae630af0' }
    'es'    = [Language] @{ Name = 'Spanish';                Mapping = 'esn'; Checksum = '0ff7d15a86d16c86edab6160e45f7f1811de27e11e2acdafae2825c0940c91d7' }
    'fr'    = [Language] @{ Name = 'French';                 Mapping = 'fra'; Checksum = '95b46d8202f0dc2a9fdce46583e78df514eaaa97f7f4e60081d9f9963eac5c88' }
    'it'    = [Language] @{ Name = 'Italian';                Mapping = 'ita'; Checksum = 'e513435933381244db94d0c3743b64b0536f22898797ddd5a21ff3d3b7e3c6c6' }
    'ja'    = [Language] @{ Name = 'Japanese';               Mapping = 'jpn'; Checksum = '84f8b69a52063ec4fbc2fd93b1626fa6ed52257ecf5af1ad44d28b4ea246c486' }
    'ko'    = [Language] @{ Name = 'Korean';                 Mapping = 'kor'; Checksum = '01d2f3bd606eda964f67608b87c534012762bb83ad25f8ce12c231f556d384c5' }
    'ru'    = [Language] @{ Name = 'Russian';                Mapping = 'rus'; Checksum = '5f3af78d9398727ee210329f03371d4b3bded0334dea777008b39ce0b33c93a6' }
    'zh'    = [Language] @{ Name = 'Chinese';                Mapping = 'chs'; Checksum = '48642dc6e9ae0ae6799ee726e8d36406c01a1a82a257ace13cd105bae848b3cc' }
    'zh-CN' = [Language] @{ Name = 'Chinese (Simplified)';   Mapping = 'chs'; Checksum = '48642dc6e9ae0ae6799ee726e8d36406c01a1a82a257ace13cd105bae848b3cc' }
    'zh-TW' = [Language] @{ Name = 'Chinese (Traditional)';  Mapping = 'cht'; Checksum = '0a408576e4fe392863c1ec1ad635bc8a48b8af2aed3fe45ad13be65d9eb8ae44' }
}

$base = 'https://download.microsoft.com/download/d/1/9/d194dc5c-4db6-4fb6-8ba2-219c93272b7b'

$pp = Get-PackageParameters

if ($pp.InstallDir) {
    $installDir = $pp.InstallDir
} else {
    if ($pp.User) {
        $programs = [Environment]::GetFolderPath('LocalApplicationData')
    } else {
        $programs = [Environment]::GetFolderPath('ProgramFiles')
    }

    $installDir = Join-Path $programs 'Microsoft JDBC DRIVER for SQL Server'
}

# check the languages parameter and default to 'en' if not supplied
$languages = $pp['Languages']

if ($null -eq $languages -or $languages -eq '') {
  $languages = 'en'
}

$reLang = “(?i)^(br|de|en|es|fr|it|ja|ko|ru|zh|zh-CN|zh-TW)$”

foreach ($language in $languages -split ',') {
  if ($language -notmatch $reLang) {
    Write-Error "Unsupported language $($language)"
  }
  
  $fileName = 'sqljdbc_{0}_{1}.zip' -f $Env:PackageVersion, $languageDefinitions[$language].Mapping

  $packageArgs = @{
    PackageName   = $env:ChocolateyPackageName
    UnzipLocation = $installDir
    Url           = "${base}/${fileName}"
    Checksum      = $languageDefinitions[$language].Checksum
    ChecksumType  = 'sha256'
  }
  
  Install-ChocolateyZipPackage @packageArgs  
}
tools\chocolateyUninstall.ps1
$ErrorActionPreference = 'Stop'

Get-ChildItem $env:chocolateyPackageFolder\* -include sqljdbc*.Install.txt, sqljdbc*.txt | Foreach-Object {
    $zipContentFile += Get-Content $_.fullname 
  }

if (($null -ne $zipContentFile) -and ($zipContentFile.Length -ge 1)) {
  $zipTargetFile = $zipContentFIle[0]
}

if (Test-Path -Path $zipTargetFile) {
  $unzipDirectory  = Split-Path $zipTargetFile 
  $parentDirectory = Split-Path $unzipDirectory
}

Uninstall-ChocolateyZipPackage 'sqljdbc' 'sqljdbc_11.2.0.0_*.zip'

# Uninstall-ChocolateyZipPackage only removes child directories unpacked from
# the archive so remove the main and parent directories if empty
if ((Get-ChildItem $unzipDirectory | Measure-Object).Count -eq 0) {
  Remove-Item $unzipDirectory -ErrorAction SilentlyContinue -Force | Out-Null
}

if ((Get-ChildItem $parentDirectory | Measure-Object).Count -eq 0) {
  Remove-Item $parentDirectory -ErrorAction SilentlyContinue -Force | Out-Null    
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Microsoft JDBC Driver for SQL Server 10.2.1.0 259 Saturday, May 14, 2022 Approved
Microsoft JDBC Driver for SQL Server 10.2.0.0 261 Tuesday, February 1, 2022 Approved
Microsoft JDBC Driver for SQL Server 9.4.1.0 201 Thursday, December 9, 2021 Approved
Microsoft JDBC Driver for SQL Server 9.4.0.0 297 Friday, August 6, 2021 Approved
Microsoft JDBC Driver for SQL Server 9.2.1.0 259 Monday, June 7, 2021 Approved
Microsoft JDBC Driver for SQL Server 7.0.0.0 10086 Friday, August 24, 2018 Approved
Microsoft JDBC Driver for SQL Server 6.2.2.0 1491 Thursday, February 8, 2018 Approved
Microsoft JDBC Driver for SQL Server 6.0.8112.100 2242 Friday, January 27, 2017 Approved
Microsoft JDBC Driver for SQL Server 4.0.2206.100 1889 Tuesday, May 7, 2013 Approved

This package has no dependencies.

Discussion for the Microsoft JDBC Driver for SQL Server Package

Ground Rules:

  • This discussion is only about Microsoft JDBC Driver for SQL Server and the Microsoft JDBC Driver for SQL Server package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Microsoft JDBC Driver for SQL Server, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus