An application stops responding when it connects to SQL Server 2008 or to SQL Server 2005 by using Java Database Connectivity Driver 2.0

Article translations Article translations
Article ID: 977305 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You have an application that uses Microsoft SQL Server Java Database Connectivity Driver 2.0 to connect to Microsoft SQL Server 2008 or to Microsoft SQL Server 2005. The application tries to close a prepared statement by using the SQLServerStatement.close function while the underlying connection that is in a connection pool is closed. In this situation, the application intermittently stops responding.

Note The underlying connection may be closed for several reasons. For example, the underlying connection may be closed for the following reasons:
  • A network I/O error occurs.
  • The SQL Server service is restarted.

CAUSE

This issue occurs because Java Database Connectivity Driver 2.0 reads a tabular data stream (TDS) repeatedly. This behavior occurs because Java Database Connectivity Driver 2.0 cannot recognize that the underlying connection is already closed.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

There are no prerequisites to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix if no instance of SQL Server is being used.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported x86-based versions of Windows
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,01405-Nov-200909:00
Sqljdbc4.jarNot Applicable466,35605-Nov-200909:00
Sqljdbc_auth.dll2.0.1803.20369,00805-Nov-200909:00
Sqljdbc_xa.dll2.0.1803.203101,26405-Nov-200909:00
Xa_install.sqlNot Applicable3,71205-Nov-200909:00
For all supported x64-based versions of Windows
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,01405-Nov-200909:00
Sqljdbc4.jarNot Applicable466,35605-Nov-200909:00
Sqljdbc_auth.dll2.0.1803.20386,40005-Nov-200909:00
Sqljdbc_xa.dll2.0.1803.203130,43205-Nov-200909:00
Xa_install.sqlNot Applicable3,71205-Nov-200909:00
For all supported IA-64-based versions of Windows
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,01405-Nov-200909:00
Sqljdbc4.jarNot Applicable466,35605-Nov-200909:00
Sqljdbc_auth.dll2.0.1803.203172,43205-Nov-200909:00
Sqljdbc_xa.dll2.0.1803.203251,77605-Nov-200909:00
Xa_install.sqlNot Applicable3,71205-Nov-200909:00
For all supported x86-based versions of UNIX
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,01406-Nov-200901:00
Sqljdbc4.jarNot Applicable466,35606-Nov-200901:00
Sqljdbc_auth.dll2.0.1803.20369,00806-Nov-200901:00
Sqljdbc_xa.dll2.0.1803.203101,26406-Nov-200901:00
Xa_install.sqlNot Applicable3,71206-Nov-200901:00
For all supported x64-based versions of UNIX
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,01406-Nov-200901:00
Sqljdbc4.jarNot Applicable466,35606-Nov-200901:00
Sqljdbc_auth.dll2.0.1803.20386,40006-Nov-200901:00
Sqljdbc_xa.dll2.0.1803.203130,43206-Nov-200901:00
Xa_install.sqlNot Applicable3,71206-Nov-200901:00
For all supported IA-64-based versions of UNIX
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,01406-Nov-200901:00
Sqljdbc4.jarNot Applicable466,35606-Nov-200901:00
Sqljdbc_auth.dll2.0.1803.203172,43206-Nov-200901:00
Sqljdbc_xa.dll2.0.1803.203251,77606-Nov-200901:00
Xa_install.sqlNot Applicable3,71206-Nov-200901:00

WORKAROUND

To work around this issue, use one of the following methods.

Method 1

Close the underlying connection in the connection pool by calling the connectionErrorOccurred function in the SQLServerPooledConnection.addConnectionEventListener method.

Method 2

Do not call the SQLServerStatement.close function after the underlying connection is closed. Instead, call the function in a try block.

Properties

Article ID: 977305 - Last Review: October 7, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server Java Database Connectivity Driver 2.0
Keywords: 
kbexpertiseinter kbsurveynew kbqfe KB977305

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com