Release Information
Microsoft JDBC Driver 6.4 for SQL Server
February 2018

------------
INTRODUCTION
------------
This file contains late-breaking or other important information that supplements the Microsoft JDBC 
Driver 6.4 for SQL Server documentation. You should read this file completely before installing 
the JDBC driver.

Your feedback is very important to us and we will strive to respond to your feedback in a timely 
manner. For information about providing feedback by using the JDBC driver blogs and online forums, 
see the Microsoft JDBC Driver 6.4 for SQL Server page at https://aka.ms/mssql-jdbc


------------
INSTALLATION
------------
Instructions for installing the JDBC driver are located in install.txt. Refer to that file for 
information about installing the JDBC driver on Windows, Linux and Mac operating systems.


---------------------------
SUPPORTED OPERATING SYSTEMS
---------------------------
Supported operating systems for Microsoft JDBC Driver 6.4 for SQL Server include:
  Windows Server 2008 SP2
  Windows Server 2008 R2 SP1
  Windows Server 2012
  Windows Server 2012 R2
  Windows Server 2016
  Windows 8
  Windows 8.1
  Windows 10
  Linux
  Mac

The list above is an example of some of the supported operating systems. The JDBC driver is designed 
to work on any operating system that supports the use of a Java Virtual Machine (JVM). 

However, only the latest operating systems of Linux and Mac OS (Ubuntu 17, CentOs 7, Suse 12, 
Mac OS 10.13) have been tested for compatibility and support.


----------------
RELEASE CONTENTS
----------------
The Microsoft JDBC Driver 6.4 for SQL Server executable zip or tar file unpacks the following files 
in the specified locations, relative to the selected installation directory:

<installation directory>\sqljdbc_<version>\<language>\install.txt
<installation directory>\sqljdbc_<version>\<language>\release.txt
<installation directory>\sqljdbc_<version>\<language>\license.txt
<installation directory>\sqljdbc_<version>\<language>\thirdpartynotices.txt
<installation directory>\sqljdbc_<version>\<language>\mssql-jdbc-6.4.0.jre7.jar
<installation directory>\sqljdbc_<version>\<language>\mssql-jdbc-6.4.0.jre8.jar
<installation directory>\sqljdbc_<version>\<language>\mssql-jdbc-6.4.0.jre9.jar
<installation directory>\sqljdbc_<version>\<language>\auth\x86\sqljdbc_auth.dll
<installation directory>\sqljdbc_<version>\<language>\auth\x64\sqljdbc_auth.dll
<installation directory>\sqljdbc_<version>\<language>\samples\<sample files...>
<installation directory>\sqljdbc_<version>\<language>\xa\xa_install.sql
<installation directory>\sqljdbc_<version>\<language>\xa\x86\sqljdbc_xa.dll
<installation directory>\sqljdbc_<version>\<language>\xa\x64\sqljdbc_xa.dll

For detailed information about each component please refer to the online documentation,
Microsoft JDBC Driver for SQL Server Documentation: 
https://msdn.microsoft.com/en-us/library/dn197850(v=sql.10).aspx


-------------
DOCUMENTATION
-------------
This release information, installation instructions, and license terms are included in this package. 
All other documentation may be found online.

Please note that the offline help files have been discontinued. 


---------
JAR FILES
---------
To support backward compatibility and possible upgrade scenarios, the JDBC Driver 6.4 includes 
three JAR class libraries in each installation package: 
	mssql-jdbc-6.4.0.jre7.jar
	mssql-jdbc-6.4.0.jre8.jar
	mssql-jdbc-6.4.0.jre9.jar.


----------------------
FEATURE SPECIFIC FILES
----------------------
Azure Active Directory and Integrated Authentication (on Windows) components are included in the 'auth' directory.

JDBC distributed transaction components are included in the 'xa' directory.


--------------------
FEATURE DEPENDENCIES
--------------------
A few features in Microsoft JDBC Driver 6.4 for SQL Server are dependent on external libraries as listed below:

1. Using 'Always Encrypted' with Azure Key Vault Provider
   Dependent library: azure-keyvault(version 1.0.0) and adal4j(version 1.4.0)
   
2. Using 'Azure Active Directory Integrated Authentication' on Windows, Linux and Mac Operating Systems
   Dependent library: adal4j(version 1.4.0)

Detailed information on including these dependent libraries in a Standard Java Application or a Maven Application
can be found here: https://go.microsoft.com/fwlink/?linkid=867575


-------
SAMPLES
-------
Sample applications that demonstrate various features of the JDBC driver are included in the samples
directory. For more details about each sample and how to run them, please refer to the online 
documentation.


-----------
CHANGE LIST
-----------
Changes from 6.2.2.1 to 6.4.0.0:
- Driver no longer reads 'fipsProvider' connection property and creates an instance of Keystore from
  the most preferred provider by traversing the list of registered security providers.
  
Improvements: 
- Driver now builds Jars with JDK 9 virtual machine and introduces methods from JDBC 4.3 API.
- Driver now supports caching Prepared Statement metadata in the driver with 'disableStatementPooling' and
  'statementPoolingCacheSize' connection properties. This feature is disabled by default.
- Added support for SQLVariant DataType in table queries, BulkCopy and Table-Valued Parameters.
- Driver now supports specifying custom TrustManager with 'trustManagerClass' and 'trustManagerConstructorArg'
  connection properties.
- Driver now supports specifying SSL protocol version by specifying a new connection property 'sslProtocol'.
- Driver now also supports Azure Active Directory Integrated Authentication on all supported Operating Systems (Windows/Linux/Mac) 
  with Kerberos.
- Added support for dataTypes DATETIME and SMALLDATETIME when using Table-Valued Parameters (TVP).
- Added support to CallableStatement to recognize parameters names with a leading '@' (at) symbol.

Bug Fixes:
- Fixed incorrect conversions when changing cases of String Literals in the driver when no or non-English
  locale is specified.
- Fixed issues with incorrect parameter count returned by getParameterCount(), when an INSERT statement 
  contains a sub query with parameters.
- Fixed issue with getParameterMetaData() when whitespace characters other than spaces are passed in query.
- Fixed issue with CallableStatement.getString() when parameter type is uniqueIdentifier.
- Fixed statement leaks encountered in SQLServerPreparedStatement.getMetaData().
- Fixed issue to use default value of 15 seconds as loginTimeout in case of a zero value specified.
- Fixed issue in PreparedStatement exception handling to throw initial Batch Exception.
- Fixed issues with DatabaseMetaData.getImportedKeys() to return correct values for DELETE_RULE and UPDATE_RULE.
- Fixed issues with ClassLoader leak caused by ActivityCorrelator class.
- Fixed issue with SQLServerDataTable construction that resulted in O(n^2) objects.
- Fixed issue in TimeoutTimer to prevent IllegalThreadStateException if the underlying ThreadGroup has been destroyed.
- Fixed issue with handling exception for Account Locked Exception 18486 while establishing connection to SQL Server.
- Fixed failure caused by xa_recover after MSDTC is restarted.


------------
KNOWN ISSUES
------------
The following are known issues with the Microsoft JDBC Driver 6.4 for SQL Server:

1) PARAMETER METADATA LIMITATIONS WHEN USING SQL SERVER 2008 OR 2008 R2

1.a) PreparedStatement.getParameterMetadata() throws an SQLException when used
with a parametrized MERGE query.

1.b) Parameter metadata for prepared statements does not work with queries having subqueries/joins.


2) CONNECTION DROPPING WITH SQL AZURE

When connecting to SQL Azure, idle connections may be terminated by a network component (such as a 
firewall) after a period of inactivity. To avoid dropping idle connections by a network component, 
the following registry settings (or their non-Windows equivalents) should be set on the operating 
system where the driver is loaded:
           
Registry Setting                                                                   Recommended value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime            30000
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveInterval         1000
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpMaxDataRetransmission  10


3) WHEN USING TVP WITH SQL_VARIANT 

3.a) FOR DATE VALUES

When using TVP to populate a table that contains datetime/smalldatetime/date values stored in sql_variant column, 
calling getDateTime()/getSmallDateTime()/getDate() on resultset does not work and throws the following exception:

	java.lang.String cannot be cast to java.sql.Timestamp

Workaround: use getString() or getObject() instead.

3.b) USING TVP WITH SQL_VARIANT FOR NULL VALUES

If you are using TVP to populate a table and send NULL value to sql_variant column type, you will encounter
an exception as inserting NULL value with column type sql_variant in TVP is currently not supported.

