FIX: The connection may time out before the first try to connect to the failover partner server when you try to connect to a SQL Server 2005 mirrored database by using an ADO.NET 2.0-based application (912151)



The information in this article applies to:

  • Microsoft .NET Framework 2.0
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium Based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition

SYMPTOMS

When you try to connect to a Microsoft SQL Server 2005 mirrored database, the connection may time out before the first try to connect to the failover partner server. This problem may occur if the following conditions are true:
  • You are using a Microsoft ADO.NET 2.0-based application.
  • The application uses the System.Data.SqlClient namespace to connect to the database.
  • The principal server is unavailable.
This problem affects connections where you specify the failover partner server in the connection string by using the "Failover Partner" keyword. This problem also affects connections where the failover server was retrieved from the primary server on a previous connection try.

CAUSE

This problem occurs because the System.Data.SqlClient namespace uses an internal default time-out value when the System.Data.SqlClient namespace connects at the network layer.

RESOLUTION

To resolve this issue, download the appropriate file for your computer:

For an x86-based computer

The following file is available for download from the Microsoft Download Center:
http://download.microsoft.com/download/2/C/5/2C5BCDC9-3241-443A-9F96-4E0B0EDFA727/NDP20-KB916002-X86.exe

For an x64-based computer

The following file is available for download from the Microsoft Download Center:
http://download.microsoft.com/download/D/3/9/D39C79DF-4158-45DF-9031-92C52AB0ED19/NDP20-KB916002-X64.exe

For an Itanium-based computer

The following file is available for download from the Microsoft Download Center:
http://download.microsoft.com/download/0/0/3/00392DD3-5B4F-4D99-94E8-6827B8F8D7EF/NDP20-KB916002-IA64.exe For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

The internal default time-out value should be a small percentage of the overall connection time out. Additionally, the overall connection time out should be sufficient to let the application try to connect to the failover partner server if the principal server is unavailable.

This hotfix changes the internal algorithm that is used for failover connection tries. The new algorithm uses a shorter internal time-out value. Therefore, the application has sufficient time to try to connect to both the primary server and the secondary server. However, the new algorithm still respects the overall connection time out that the application code specifies.

Notes
  • In some scenarios, the observed time out may not be exactly the value that you specified. This behavior depends on where the delay occurs during the connection process. This behavior is true for all connections. It is not specific to this bug or to database mirroring.
  • This hotfix corrects the problem only for connections that use the TCP/IP protocol. Currently, we recommend that you use the TCP/IP protocol in environments where database mirroring is used.
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Modification Type:MinorLast Reviewed:7/26/2006
Keywords:kbprb kbQFE kbpubtypekc KB912151 kbAudDeveloper kbAudITPRO