BUG: Slow TCP/IP Connection to SQL Server from NT & DOS Client

ID: Q128617


The information in this article applies to:

BUG# NT: 8507 (4.21a)

SYMPTOMS

The initial TCP/IP sockets connection to SQL Server from Microsoft Windows NT and MS-DOS clients using DBMSSOCN.DLL and DBMSSOC.EXE, respectively, can be very slow due to the abnormal IP address resolution behavior in these client-side Network Libraries (Net-Library).

The TCP/IP client-side sockets Net-Libraries for Windows NT and MS-DOS (DBMSSOCN.DLL and DBMSSOC.EXE) try to resolve host address even if the SQL Server's IP address is already hardcoded in the connection string.

This unnecessary attempt to resolve IP address can cause substantial delay in the initial connection. This is because the Net-Library tries to use the IP address as the host name to resolve the host address, which will eventually fail as expected. However, the failed attempts can cause substantial delay as the client has to wait for either the broadcast or point-to-point connection timeouts, depending on how the client is configured for IP host resolution.


CAUSE

The Net-Library calls GetHostByName() to resolve IP address whether a host name is used or not. Therefore, if an IP address is used instead of a host name, this call will cause the workstation to broadcast unnecessarily if b- node is used, which in turn causes the connection delay.


WORKAROUND

You can workaround this problem by using a host name rather than the IP address in the connection string. When you use the host name, the client will try to resolve its address using the appropriate host address resolution mechanism configured on the client. Because the host name should be resolved successfully, the time it takes is much shorter than the failed address resolution attempts if you hardcode the IP address. Based on this, there are two workarounds:


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 4.21a. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: TCP/IP host name performance connection net-lib Windows NT


Keywords          : kbenv kbusage SSrvNet_Lib kbbug4.21a SSrvWinNT 
Version           : 4.21a
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: April 15, 1999