Microsoft KB Archive/311836

= FIX: SQL Server Driver Fails to Connect over TCP/IP Using Three Parameters in Address Keyword =

Article ID: 311836

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft ODBC Driver for SQL Server 2000 2000.80.194
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.6 Service Pack 1
 * Microsoft Data Access Components 2.6 Service Pack 2
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q311836



SYMPTOMS
A connection to a back-end SQL Server database may fail, and you receive the following error message:

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect).

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

This error occurs under the following conditions:  You are using the Microsoft ODBC Driver for SQL Server 2000 that comes with Microsoft Data Access Components (MDAC) version 2.6, 2.6 SP1, 2.6 SP2, or 2.7. The TCP/IP protocol is used; in other words, the Network keyword is set to DBMSSOCN.  The Address keyword contains three parameters; for example, the server name or IP address, the port number, and an urgent token: &quot;DSN=DSNName;SERVER=servername;DATABASE=pubs;Network=DBMSSOCN;Address=IP_Address,1433,urgent;&quot;  The server to which you are connecting is not a local server.

This article discusses one possible cause of this message. Applying the fix that is referenced in this article helps only if you experience this exact scenario. If you receive this message from Query Analyzer or SQL Enterprise Manager, you are not experiencing this particular scenario. This scenario only occurs when you pass an obsolete parameter at the end of a customer connection string.



CAUSE
Beginning with MDAC 2.6, the SQL Server ODBC driver uses a &quot;Super Socket&quot; network library architecture which encapsulates all network libraries. If it finds three parameters in the Address keyword of a connection string, the Super Socket library assumes the SPX protocol instead of TCP/IP. (The SPX protocol is the only protocol that requires three parameters in the Address keyword; the TCP/IP protocol requires only two parameters. See the &quot;More Information&quot; section for details.)



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next MDAC service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone 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 typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

IMPORTANT: Microsoft is releasing this fix for backward compatibility only. It is strongly recommended that you use the workaround described in the &quot;Workaround&quot; section instead of using this fix.

The English version of this fix should have the following file attributes or later:

MDAC 2.6, 2.6 SP1, and 2.6 SP2: Date        Version            Size     File name     Platform --- 9-NOV-2001  2000.080.0467.00   86,097   Dbnetlib.dll  x86



WORKAROUND
To work around this problem, do not use three parameters in the Address keyword of the connection string when using TCP/IP. To connect to SQL Server over TCP/IP, only two parameters are needed: the server name or IP address, and the port number.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

<div class="moreinformation_section">

MORE INFORMATION
Early Microsoft SQL Server 4.2 releases which first supported TCP/IP connections allowed an additional urgent parameter that changed the way that cancel requests were handled by the TCP/IP protocol stack. Later SQL Server 4.2 network libraries did not need the additional parameter and ignored it. The redesigned Super Socket network library does not take into account the use of this outdated additional parameter.

Note that using the urgent token does not affect a connection in any way. Prior to MDAC version 2.5, the urgent token was not used. Not using the urgent token did not cause any error and allowed the connection to occur.

For additional information on valid SQL Server connection string keywords, click the article number below to view the article in the Microsoft Knowledge Base:

229929 INFO: Registry Entries and Keywords for SQL Server Connection Strings

Keywords: kbhotfixserver kbqfe kbprb kbqfe KB311836

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.