Release Information Microsoft SQL Server 2005 JDBC Driver 1.1 August 2006 INTRODUCTION ------------ This file contains late-breaking or other important information that supplements the Microsoft SQL Server 2005 JDBC Driver 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 newsgroup and online forums, see the Microsoft SQL Server 2005 JDBC Driver page at http://msdn.microsoft.com/data/ref/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 and Unix operating systems. RELEASE CONTENTS ---------------- The Microsoft SQL Server 2005 JDBC Driver executable zip or tar file unpacks the following files in the specified locations, relative to the selected installation directory: \sqljdbc_\\install.txt \sqljdbc_\\release.txt \sqljdbc_\\license.txt \sqljdbc_\\sqljdbc.jar \sqljdbc_\\auth\x86\sqljdbc_auth.dll \sqljdbc_\\auth\x64\sqljdbc_auth.dll \sqljdbc_\\help\default.htm \sqljdbc_\\help\index.htm \sqljdbc_\\help\toc.htm \sqljdbc_\\help\html\ \sqljdbc_\\help\local\ \sqljdbc_\\help\samples\ \sqljdbc_\\xa\xa_install.sql \sqljdbc_\\\xa\x86\sqljdbc_xa.dll \sqljdbc_\\\xa\x64\sqljdbc_xa.dll CHANGE LIST ----------- The following is a list of changes that have been made in the Microsoft SQL Server 2005 JDBC Driver since the version 1.0 release in January 2006. 409319 Canceling statement execution works from any thread without closing the connection. 423894 Sun CTS: DatabaseMetaData.getNumericFunctions no longer returns MOD in the list of supported functions for SQL Server 2000. 426389 Calling Statement.execute no longer causes an SQLException with the message "sp_cursoropen/sp_cursorprepare: The statement parameter can only be a single select or a single stored procedure" for UPDATE WHERE queries when the selectMethod=cursor connection property is set. 436718 Calling PreparedStatement.execute no longer causes an SQLException with the message "sp_cursoropen/sp_cursorprepare: The statement parameter can only be a batch or a stored procedure with a single select, without FOR BROWSE, COMPUTE BY, or variable assignments" for INSERT INTO queries when the selectMethod=cursor connection property is set. 434562 Appropriate JDBC types are now reported in the DATA_TYPE column from various metadata calls for GUID, NCHAR, NVARCHAR, and NVARCHAR(max) SQL Server types. These are sql.types.char, sql.types.varchar, and sql.types.longvarchar, respectively. 450639 The driver no longer throws an SQLException with the message "Server failed to resume the transaction, desc: 4600000001." when configuring SQL Server 2005 as the JBoss JMS message store. 425030 The driver correctly handles setting and retrieving dates, times, and timestamps with time zones other than the system default. 432090 Executing the statement DBCC SHOW_STATISTICS produces the correct set of result sets. 429427 Calling CallableStatement.clearParameters no longer causes a NullPointerException on a subsequent call to retrieve an OUT parameter value. 433170 Several aspects of XA transaction behavior have been corrected. 438767 The behavior of the getTime and getDate methods with Calendar objects and values around daylight saving time (DST) transitions in different time zones and locales has been corrected. 422875 PreparedStatement.setObject and ResultSet.updateObject with scale will scale numeric values correctly. 435796 Executing SQL WRITETEXT statements no longer throws an SQLException with the message "No TDS_RET_STATUS was found for the stored procedure output parameters." 424295 DatabaseMetaData.getMaxConnections no longer throws an SQLException with the message "The configuration option 'user connections' does not exist, or it may be an advanced option" for SQL Server 2005 servers. 423881 The driver correctly returns update counts from triggers. 20012145 The driver sets the transaction mode in a SQL Server database and correctly reports the driver's autocommit mode when the Connection.setAutoCommit method is called. 428803 Executing a statement after setting a binary or character stream with an actual length that differs from the one passed to the setter no longer closes the connection after throwing the appropriate SQLException. 430837 Connections obtained from SQLServerXADataSource can be used in local transactions while they are outside the scope of an XA transaction. 20012126 The BIGINT SQL type is used for sending java.sql.BIGINT prepared statement parameter values to a SQL Server database, which results in a more efficient query execution plan. 428197 Batch execution of prepared statements works correctly when there is more than one item in the batch. 426966 Handling of double quote-delimited literals in SQL statements has been improved. 429085 Historical changes in daylight saving time (DST) in all time zones are correctly handled. 433394 Calling Statement.executeBatch after setting a BLOB value no longer throws an SQLException with the message "The conversion from BLOB to BINARY is unsupported." 435448 The driver no longer throws an SQLException with the message "com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '-'" when sending a BigDecimal prepared statement parameter value to the server with the 5.0 JRE. 423733 ResultSet.rowDeleted no longer throws an ArrayIndexOutOfBounds exception after a call to ResultSet.beforeFirst or ResultSet.afterLast. 429214 Unused portions of java.sql.Time and java.sql.Date objects are normalized to the correct values. 424450 Sending a binary or ASCII stream value that is between 4022 and 4025 bytes long to a varbinary(max) column in a SQL Server 2005 server no longer throws an IndexOutOfBoundsException. 428725 Fractional numeric values are correctly truncated by getter methods when converting to integral types. 432590 Sending an ASCII stream longer than 4000 characters to the server by using the PreparedStatement.setObject method as Type.VARCHAR sends the entire stream rather than truncating it at 4000 characters. 445528 The SQLServerResultSet.getBoolean method is supported only on number and character data types. It converts values "1", 1, and "true" to true, and values "0", 0, and "false" to false. For all other values the behavior is undefined. 421916 The setObject(parameter, null) methods of the SQLServerPreparedStatement and the SQLServerCallableStatement classes no longer throw a NullPointerException. See the setObject API topics in the JDBC help system for more information. 450271 SQLServerPreparedStatement objects no longer re-throw exceptions from previous executions. 441998 Changed the default transaction isolation from SERIALIZABLE to READ_COMMITTED in XA transactions. 442038 Using the setTimestamp method with a Calendar object now produces correct timestamps during the period exiting daylight saving time. 443970 SQLServerStatement execution with the selectMethod connection string property set to "cursor" now honors query timeout. 444121 EBCDIC database collations are now supported. 439751 Terminating newlines can now be used in {call ...} SQL escape syntax. 440734 Closing an already closed stream returned by the getXXXStream method no longer throws an exception. KNOWN ISSUES ------------ The following are known issues with the Microsoft SQL Server 2005 JDBC Driver: 1) DRIVER LOAD CONFLICT WITH THE SQL SERVER 2000 JDBC DRIVER If you load both the Microsoft SQL Server 2000 JDBC Driver and the Microsoft SQL Server 2005 JDBC Driver in the same process, in some cases the 2000 version of the JDBC driver will incorrectly accept a DriverManager.getConnection method call that is targeted for the 2005 version of the JDBC driver. The problem is caused by the 2000 version of the JDBC driver incorrectly accepting the "jdbc:sqlserver://" URL prefix if it is loaded first. To work around this issue, load the 2005 version of the JDBC driver class first, as follows: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); // 2000 version This will ensure that the "jdbc:sqlserver://" URL prefix is handled by the 2005 version of the JDBC driver and the "jdbc:microsoft:sqlserver://" URL prefix is handled by the 2000 version of the JDBC driver. 2) LIMITATIONS GETTING PARAMETER METADATA FOR PREPARED STATEMENTS There are some limitations when using the SQLServerParameterMetaData class with prepared statements. SQL INSERT statements require the optional INTO clause and SQL DELETE statements require the optional FROM clause to get the parameter metadata correctly. 3) SQL SERVER 2000 DATA CONVERSION LIMITATIONS When using SQL Server 2000 with the JDBC driver, the following data conversion limitations apply: - String data cannot be converted to an underlying money or smallmoney column. - String data longer than 4000 characters cannot be converted to char or varchar underlying columns. - String data more than 4000 characters cannot be converted to nchar or nvarchar underlying columns if the sendStringParametersAsUnicode connection string property is set to false, or the setAsciiStream method is called. - String data cannot be converted to text columns if the sendStringParametersAsUnicode connection string property is set to true. If you need to support string to text columns conversions, set the sendStringParametersAsUnicode property to false. 4) LIMITATIONS WITH NAMED PARAMETERS Named parameters are not supported with stored procedures that contain a left bracket "[" in their name. For example, a name like "stor[edProc". Note that this does not affect the usual escaping of the stored procedure names by using "[]". 5) XAResource.setTransactionTimeout FAILURE Note that XAResource.setTransactionTimeout will not work unless the following hotfix is applied to each SQL Server machine that is participating in XA transactions: "899756 FIX: MSDTC does not detect process termination, and MSDTC cannot set time-out values for XA transactions in Windows Server 2003" http://support.microsoft.com/kb/899756. Without this fix the only valid timeout value is the default value of 0, meaning infinite timeout. 6) XA TRANSACTION FAILURE ON WINDOWS XP XA transactions will not work if SQL Server is running on Windows XP unless the following hotfix is applied: "Performance Slows When You Use XA Transactions with SQL Server" http://support.microsoft.com/kb/318818 Note this issue only applies when the SQL Server that is participating in the XA transaction is running on Windows XP. Client applications running on Windows XP connecting to a remote SQL Server that is not running on Windows XP can participate in XA transactions. This issue does not apply to Windows 2000 and Windows Server 2003. 7) SUN SOLARIS NEEDS GZIP TO INSTALL THE JDBC DRIVER If installing the JDBC driver on a Sun Solaris computer, you may need to first install GZIP in order to unzip the driver files. GZIP can be downloaded from www.gzip.org. 8) CONNECTION TIMEOUTS USING DATABASE MIRRORING When you use the JDBC driver in a database mirroring configuration, the default connection timeout value is 0, which may result in indefinite connection attempts. Therefore, when you try to connect to a principal and mirror database that are both initially down, the JDBC driver will oscillate between each of the servers indefinitely until one gets back online. To escape from these infinite connection attempts, specify a finite value for the loginTimeout connection string property or incorporate timeout logic into your application. 9) CONVERSION OF BIGDECIMAL VALUES When you convert BigDecimal values to a string representation, the conversion of those values depends on which version of the JVM that you are using. For example, the following code demonstrates these differences: String str = new BigDecimal("1E10").toString(); System.out.println("String is " + str); //with JVM 1.4 : prints out "String is 10000000000" //with JVM 1.5 : prints out "String is 1E+10" To achieve consistent behavior when it uses BigDecimal values, your application should use the BigDecimal.toPlainString method when running against JVM 1.5. 10) UNIQUEIDENTIFIER COLUMN TYPE VALUES RETURNED DIFFERENTLY When using one of the metadata classes to retrieve column types, the value returned for the UNIQUEIDENTIFIER column type is inconsistent. When retrieving this value by using the SQLServerDatabaseMetaData class, the value returned is CHAR. However, if the value is retrieved by using the SQLServerResultSetMetaData or SQLServerParementerMetaData class, the value returned is a VARCHAR. In addition, the UNIQUEIDENTIFIER column type is mapped to the java.sql.Types.CHAR data type. 11) JDBC IPV6 CONNECTION BEHAVES INCONSISTENTLY WHEN USING INTEGRATED SECURITY When using a numeric IPV6 address with integrated security, the connection may take longer to open or even fail. Integrated security connections to an IPV6 server will work as long as you use the machine name.