共用方式為


Microsoft JDBC Driver 4.0 for SQL Server Released!

Dear SQL Server Developer Community,

I am pleased to report that the Microsoft JDBC Driver 4.0 for SQL Server is now released. Thank you for all your great feedback on our three community technology previews (CTP). Our 4.0 release contains some great features which I would like to highlight.

Pure Java Kerberos

Customers using non-Windows platforms now have the option of using Kerberos for authentication. The table below summarizes available authentication options.

Platform

Authentication

Non-Windows

Pure Java Kerberos

Non-Windows

SQL Server

Windows

Pure Java Kerberos

Windows

SQL Server

Windows

Kerberos with NTLM backup

Windows

NTLM

 

We have several customers who have tested Kerberos via our CTP driver, some using Linux in a cross-realm environment.

Always On

The Microsoft JDBC Driver 4.0 for SQL Server supports AlwaysOn high availability and disaster recovery. Customers have the option to use AlwaysOn instead of database mirroring. 
Some key features include

  • Ability to specify whether an application is connecting to an AlwaysOn Availability Group Cluster (multi subnet failover)
  • Ability to specify application intent as read only vs. read/write

Correlated Tracing with XEvents

SQL Server 2012 introduces a user interface for XEvents and users can choose to track driver related actions within XEvents. Simply set appropriate parameters for logging, create an XEvents session and the Microsoft JDBC Driver 4.0 for SQL
Server will send tracing information to XEvents to enable troubleshooting and monitoring. The correlation information will be available in all XEvent targets including in memory, the XEvents ring buffer, log files, and the viewer in management studio.

FormatID change in XA Transactions

Based on customer and partner feedback, we made a change to the way the FormatID field is handled in XA transactions. The Microsoft JDBC Driver 4.0 for SQL Server will now use the provided formatID field in all XA transactions.

Other features

Other features include UTF-16 support, enhanced SQL Azure support, support for sparse columns,and bug fixes.

Documentation, Feedback and Download

You can find documentation on the driver at our MSDN documentation page, obtain technical support via our forums or Microsoft Customer Support, report bugs via the SQL Server Connect Site, and (most importantly!) download the new driver here.

Thank you for your support and we look forward to your feedback.

Shamitha Reddy

Program Manager - Microsoft JDBC Driver for SQL Server

Comments

  • Anonymous
    March 06, 2012
    Please, make it available via Maven Central.

  • Anonymous
    April 03, 2012
    The comment has been removed

  • Anonymous
    April 03, 2012
    @fsdba  If you are running on SUSE Linux you can authenticate using pure Java Kerberos or SQL Server Authentication.  You can only use Windows authentication if you are running the JDBC Driver on the Windows platform.

  • Anonymous
    April 09, 2012
    Hi - Is ther any Documntation/case study/KB article on how to use Java Kerberos on Linux Suse environment?

  • Anonymous
    April 11, 2012
    @fsdba The following topic covers Kerberos setup for WIndows, Linux, and other non-Windows environments. msdn.microsoft.com/.../gg558122.aspx

  • Anonymous
    April 15, 2012
    One of the major complaints against using the MSSQL driver over jTDC was the performance. A developer in this post reports Microsoft driver is 50% slower than JTDC. stackoverflow.com/.../why-is-jtds-faster-than-microsoft-jdbc-driver Any comment on performance improvements in this new version?

  • Anonymous
    April 15, 2012
    correction: It is jTDS not jTDC/JTDS.

  • Anonymous
    April 16, 2012
    @mv288 Thanks for your feedback. We are continuously looking at ways to improve the performance and scalability of the Microsoft JDBC Driver for SQL Server. Would you like to provide us with more specifics via our blog contact page? blogs.msdn.com/.../contact.aspx Also, have you compared our latest driver - Microsoft JDBC Driver 4.0 for SQL Server using SQL Server 2012 with jTDS? I responded on Stack Overflow as well.

  • Anonymous
    April 29, 2012
    The comment has been removed

  • Anonymous
    May 08, 2012
    @brendanh The feedback that jTDS is faster than the Microsoft JDBC is mainly anecdotal.  We have on numerous occasions asked for additional details regarding how the tests were conducted and have not received those details. The key with performance benchmarking is to ensure that products are being compared equally (apples to apples instead of apples to oranges).  We have heard that jTDS handles Secure Sockets Layer (SSL) communication differently from the Microsoft JDBC Driver.  If the performance tests do not take into account these differences, the test results may be skewed. We would be happy to partner with the community to conduct performance benchmark testing.  Keep in mind that one needs written approval from Microsoft prior to publishing any results (see section 2 of our software license). With regards to bugs in the Microsoft JDBC driver, every software product on the market will have some bugs.  We encourage our users to report bugs via Microsoft Connect and also encourage the community to vote on those bugs so we can understand how many individuals are impacted by a particular bug.  We carefully review every bug report we receive.  We look at various variables including whether a workaround exists, if a fix can be made without impacting backward compatibility and then determine a course of action for that bug. When choosing a driver, here a few points to consider

  •  How does the driver handle security including SSL communication?  The Microsoft JDBC Driver is subjected to extensive Corporate security reviews at each release.
  •   How active are the forums?  We have a very active forum that offers free community support.  Other Microsoft JDBC users & MVP's frequently answer forum posts.  In addition our forums are monitored by Microsoft Customer Support and the Microsoft Product Group.  The forums are easily searchable on the internet and MSDN.
  •  Is paid support available?  Support is available for our driver via Microsoft Customer Support.  In addition, Customer Support and the Product Group have frequent communication on customer cases.
  •  Does the driver support new SQL Server releases/features?  The Microsoft JDBC Driver 4.0 supports SQL Server 2012 along with Always On and XEvents.  We strive to support new functionality in SQL Server, SQL Azure, PDW, and other Microsoft offerings.
  •  Is the driver adding new features regularly?  We released the 4.0 version of the driver in March 2012 that included pure Java Kerberos support, a FormatID change (requested by customers & partners), and other features.  We are looking forward to future releases of the driver so we can continue to expand on our driver's functionality.
  • Anonymous
    August 22, 2012
    I'm confused about this annoucement.  I have a sqldjbc4.jar that is internally dated to 4/19/2010.  It appears to be from Microsoft and it works.  How is does my older version differ from this newer release?

  • Anonymous
    August 22, 2012
    I just tried out this newer release. My older version worked fine from my Java application. However, the new version generates the following error "SQL Server version 8 is not supported by this driver. ClientConnectionId:92d3a68d-f3db-4442-a6b0-115dfa86811f".  Why is this happening?

  • Anonymous
    September 26, 2012
    The driver does not support running with "SET SHOWPLAN_ALL ON;" As soon as that is turned on, every select statement throws an exception with: The TDS protocol stream is not valid. Unexpected token TDS_COLMETADATA (0x81). [SQL State=08S01] Driver version: 4.0.2206.100 Happens with SQL Server 2012 Express and SQL Server 2005 SP3

  • Anonymous
    October 01, 2012
    More details on the problem: the driver only throws an exception when setMaxRows() is called on the statement object before running the statement to be explained.

  • Anonymous
    February 07, 2013
    Great!  Now can you please publish it to Maven Central? social.msdn.microsoft.com/.../db43206a-756c-4291-9c67-e813d18bdbf5

  • Anonymous
    June 04, 2013
    Please upload it in maven central! Because if you don't upload it there, every developer that use any project with SQL Server JDBC Driver need to set this configuration in a local repository. Best,

  • Anonymous
    July 20, 2013
    am using jvm 6, but the bug off the date (date-1day)  still present and this time it's very hazardous befor it was beter for all the date you have just to add one day but now sometimes the date show corectly and sometimes not please fixe this  bugs

  • Anonymous
    January 12, 2014
    Please, make it available via Maven Central.

  • Anonymous
    June 30, 2014
    does jdbc 4 support sql 2014 in-memory tables or stored procedures?

  • Anonymous
    September 12, 2014
    The comment has been removed

  • Anonymous
    August 11, 2015
    Trying to integrate SQL Server with Java application running on Glassfish turned out to be a complete failure. It is working great with MySQL but trying to connect it with JDBC (sql4jdbc.jar) to SQL Server is literally a nightmare! Here is very detail description of the problem: stackoverflow.com/.../invalidkeyspecexception-on-deploying-ear-file-containing-entitybeans-and-using ... But in a short, all I get from this "Integration exercise" is this entry in a Glassfish log file: Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Server key". ClientConnectionId:a3f21831-fbc0-491c-9691-2b28500d7d2b Error Code: 0. Please see server.log for more details. ... Apparently caused by: Caused by: java.security.spec.InvalidKeySpecException: Unknown KeySpec type: java.security.spec.ECPublicKeySpec No idea what to do.