PRB: Slow SQL Server Connections Using Named Pipes with Win 95

Last reviewed: October 29, 1997
Article ID: Q156430
The information in this article applies to:
  • Microsoft SQL Server versions 4.21, 6.0, and 6.5
  • Win32 Named Pipes

SYMPTOMS

When you run SQL Server applications on a computer running Windows 95, you may experience slow connections to Microsoft SQL Server using named pipes. This applies to both ODBC and DB-Library applications. The same applications will run normally on a computer running Windows NT, or using other interprocess communication (IPC) connections, such as TCP/IP sockets or SPX.

Also when reading data from a named pipe when the client is on Windows 95, calls to blocking ReadFile will not return immediately when there is no data present. When there is data present, a blocking read may take up to 1 second per message.

CAUSE

This problem is caused by Windows 95 NWLink Direct-Hosting, which was implemented to enhance the general network performance of Windows 95. A client using Direct-Hosting may experience a delay in reading from named pipes.

WORKAROUND

To work around this problem, do any of the following:

  • Use other IPCs, such as TCP/IP sockets. Because Windows 95 supports many protocols (such as TCP/IP and NWLink IPX/SPX), you can easily configure your clients to use these alternative IPCs for SQL Server connections. For information on how to configure your clients to use other IPCs, consult SQL Server Books Online.
  • Disable the Direct-Hosting feature for client computers running Windows 95. To do this, run the Regedit.exe program on the client computer running Windows 95, and navigate to the following registry key:

          HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP
    

    Add a string value named DirectHost and set the string value to 0 (zero). Also, ensure that NetBIOS support is enabled for NWLink, if NWLink is the only transport protocol loaded on the client computer running Windows 95.

  • Remove the NWLink protocol from the client computer running Windows 95. Unless you need to access NetWare servers, you don't have to load NWLink on the clients. Instead, use TCP/IP and/or NetBEUI, both of which also support named pipes.

MORE INFORMATION

Direct-Hosting is enabled by default, so you may run into this problem if you have NWLink installed and configured as the default transport protocol. However, if you have other transport protocols loaded at the same time, you may not encounter this problem, because Windows 95 may use named pipes over other protocols, rather than NWLink IPX/SPX.

This problem does not occur with 16-bit Windows applications, because the 16-bit named pipes Net-Library for Windows peeks the named pipes first until data is available, and then begins to read. This method avoids the delay with Direct-Hosting in its own Peeknamedpipe messages.


Additional query words: DirectHosting Win-95 Win95 netlib net-lib
performance
Keywords : SSrvNet_Lib kbinterop kbnetwork
Version : 4.21 6.0 6.5
Platform : WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.