Compartilhar via


Announcing the JDBC Driver 6.0 for SQL Server

We are pleased to announce the release of the Microsoft JDBC Driver 6.0 for SQL Server! Like the preview drivers, it brings support for:

  • Always Encrypted
  • Azure Active Directory authentication
  • Table-Valued Parameters
  • Internationalized Domain Names (IDN)
  • Extended support for Parameterized Queries
  • Transparent connections to AlwaysOn Availability Groups

The JDBC Driver 6.0 for SQL Server is fully compliant with JDBC specifications 4.1 and 4.2. The jars contained in the 6.0 package are named according to their compliance with the JDBC API version. For example, the sqljdbc42.jar file from the 6.0 package is JDBC API 4.2 compliant. Similarly, the sqljdbc41.jar file is compliant with JDBC API 4.1.

To ensure you have the right sqljdbc42.jar or sqljdbc41.jar, run the following lines of code. If the output is "Driver version: 6.0.7507.100", you have the JDBC Driver 6.0 package.
Connection conn = DriverManager.getConnection("jdbc:sqlserver://<server>;user=<user>;password=<password>;"); System.out.println("Driver version: " + conn.getMetaData().getDriverVersion());

Read the full release announcement here.

Learn how to pick which jar file is right for you here and read more documentation here.

Andrea Lam (andrela@microsoft.com)

Comments

  • Anonymous
    July 27, 2016
    Will these drivers every be published to Maven Central or JCenter on Bintray? Not having these drivers available in public repositories is annoying since the majority of projects are using a dependency manager such as Maven, Gradle, or Ivy. It forces teams to have to go through the minutia of downloading the driver and manually adding to a local repo or adding a local dependency.
    • Anonymous
      August 02, 2016
      Hi Ryan,Thanks for the feedback. We have heard multiple requests for hosting on Maven and will take this into consideration for our following releases. Please stay tuned.Thanks,Andrea LamProgram Managerandrela@microsoft.com
  • Anonymous
    August 08, 2016
    Hi Andrea,I noticed that this driver is still not supporting sql_variant data type. Are you planning on adding support for the sql_variant data type? If so, can you share a timeframe?
  • Anonymous
    August 22, 2016
    Just a suggestion: would it be possible to use the SQLServerDataTable class to pass the sqlType. That way we could use this nicely in spring: NamedParameterJdbcTemplate jdbcTemplate = new NamedParameterJdbcTemplate(dataSource); final String sql = "{call dbo.UpdateMsDriverTest(:data)}"; SQLServerDataTable dataTable = new SQLServerDataTable(); dataTable.setSqlType("dbo.TheSqlDataType"); dataTable.addColumnMetadata("ThisId", Types.INTEGER); dataTable.addColumnMetadata("ThatId", Types.SMALLINT); dataTable.addRow(2, 1); dataTable.addRow(2, 2); final MapSqlParameterSource source = new MapSqlParameterSource(); source.addValue("data", dataTable); jdbcTemplate.update(sql, source);Of course it would require some minor fixes in the driver code (TVP class mainly).
  • Anonymous
    August 22, 2016
    The comment has been removed
  • Anonymous
    August 25, 2016
    Why don't you opensource the driver?
  • Anonymous
    October 20, 2016
    Unfortunately, the JavaKerberos authentication still does not work for Cross-Realms (it uses still not Kerberos authentication with CrossDomain (it uses default_realm for realm for Cross-Domain).Do you plan to fix this ?
  • Anonymous
    October 23, 2016
    Why were the setStructured() methods removed from the ISQLServerPreparedStatement interface between the preview and final versions of the driver. They are now only defined on the SQLServerPreparedStatement class as final methods, which makes them somewhat painful to mock for unit testing.
  • Anonymous
    April 03, 2017
    The latest version of “Microsoft JDBC Driver 6.0 for SQL Server” is missing the following files:• sqljdbc.jar,• sqljdbc4.jar• sqljdbc41.jarThese files are required for backwards compatibility, and are referred to in the documentation here:https://docs.microsoft.com/en-us/sql/connect/jdbc/using-the-jdbc-driverThese files were part of the download late last year, but now they are not.Would you please update the download to include these files again?