Symptoms

When you try to connect to Microsoft SQL Server 2012 through an AlwaysOn availability group listener from a client application, you may experience a logon time-out error message.

For example, when you use SqlCmd command, you may receive the following error message:

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

[Microsoft][SQL Server Native Client 11.0]Unable to complete login process due to delay in opening server connection


When you use a Microsoft .NET Framework 3.5-based or Microsoft .NET Framework 4.0-based application by using the .Net Framework Data provider for SQL Server, you may receive the following error message:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)



Note If you increase the login time-out to 30 seconds, the client application takes approximately 20 seconds to connect successfully.

These symptoms occur when the following conditions are true:

  • Your availability group is defined in a multi-subnet.

  • You specified the MultiSubnetFailover parameter when you connect.

  • You have an active Transport Driver Interface (TDI) filter driver that is installed on the client application workstation.

Cause

This issue occurs because the Tdx.sys driver does not handle the Closesocket() function correctly when the function is called in the middle of a TCP/IP handshake.

Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running Windows 7 SP1 or Windows Server 2008 R2 SP1.

For more information about how to obtain a Windows 7 or Windows Server 2008 R2 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

976932Information about Service Pack 1 for Windows 7 and for Windows Server 2008 R2

Registry information

To apply this hotfix, you do not have to make any changes to the registry.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.

Windows 7 and Windows Server 2008 R2 file information notes
Important Windows 7 hotfixes and Windows Server 2008 R2 hotfixes are included in the same packages. However, hotfixes on the Hotfix Request page are listed under both operating systems. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under "Windows 7/Windows Server 2008 R2" on the page. Always refer to the "Applies To" section in articles to determine the actual operating system that each hotfix applies to.

  • The files that apply to a specific product, SR_Level (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table:

    Version

    Product

    Milestone

    Service branch

    6.1.760
    1.22xxx

    Windows 7 and Windows Server 2008 R2

    SP1

    LDR

  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows 7 and for Windows Server 2008 R2" section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintaining the state of the updated component. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.

For all supported x86-based versions of Windows 7

File name

Tdx.sys

File version

6.1.7601.22382

File size

74,752

Date (UTC)

12-Jul-2013

Time (UTC)

09:17

Platform

x86

For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name

Tdx.sys

File version

6.1.7601.22382

File size

118,272

Date (UTC)

12-Jul-2013

Time (UTC)

09:35

Platform

x64

For all supported IA-64-based versions of Windows Server 2008 R2

File name

Tdx.sys

File version

6.1.7601.22382

File size

236,544

Date (UTC)

12-Jul-2013

Time (UTC)

09:03

Platform

IA-64


Workaround

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

  • Increase your application’s login time-out to 30 seconds.

  • The TDI feature is deprecated in Windows Vista, Windows Server 2008, or a later version of Windows. You can use the Windows Filtering Platform (WFP)-based drivers instead. Contact the vendor of the installed TDI filter driver to request information about upgrades to the product that implement the new Windows Filtering Platform. Upgrade the product, if it is possible.

  • Replace the TDI by using a comparable product that has implemented the Windows Filtering Platform.

  • Set the RegisterAllProvidersIP property to 0 for the availability group listener resource in the Windows cluster. When the RegisterAllProvidersIP property is set to 0, you do not have to specify the MultiSubnetFailover parameter. For more information about this workaround, go to the following MSDN website:
    Create or Configure an Availability Group Listener (SQL Server)

Status

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

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

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

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x86-based versions of Windows 7

File name

X86_2c94e745aaec3431931d51020305e2b9_31bf3856ad364e35_6.1.7601.22382_none_6fcc2f6025233efa.manifest

File version

Not applicable

File size

702

Date (UTC)

12-Jul-2013

Time (UTC)

17:26

Platform

Not applicable

File name

X86_microsoft-windows-tdi-over-tcpip_31bf3856ad364e35_6.1.7601.22382_none_ec81028053b014a1.manifest

File version

Not applicable

File size

2,924

Date (UTC)

12-Jul-2013

Time (UTC)

11:37

Platform

Not applicable

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name

Amd64_fe6f131c914351fbcf6c3bc973329866_31bf3856ad364e35_6.1.7601.22382_none_a8b3dc126d52c78a.manifest

File version

Not applicable

File size

706

Date (UTC)

12-Jul-2013

Time (UTC)

17:26

Platform

Not applicable

File name

Amd64_microsoft-windows-tdi-over-tcpip_31bf3856ad364e35_6.1.7601.22382_none_489f9e040c0d85d7.manifest

File version

Not applicable

File size

2,926

Date (UTC)

12-Jul-2013

Time (UTC)

12:33

Platform

Not applicable

Additional files for all supported IA-64-based versions of Windows Server 2008 R2

File name

Ia64_649247023b89e8d48b1a96bffe9b85cd_31bf3856ad364e35_6.1.7601.22382_none_a9a13e5e5a562b37.manifest

File version

Not applicable

File size

704

Date (UTC)

12-Jul-2013

Time (UTC)

17:26

Platform

Not applicable

File name

Ia64_microsoft-windows-tdi-over-tcpip_31bf3856ad364e35_6.1.7601.22382_none_ec82a67653ae1d9d.manifest

File version

Not applicable

File size

2,925

Date (UTC)

12-Jul-2013

Time (UTC)

11:35

Platform

Not applicable


Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×