Microsoft KB Archive/107647

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 08:23, 21 July 2020 by X010 (talk | contribs) (Text replacement - "[[../sqlserver/q" to "[[../")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INFO: Connecting to SQL Server from TCP/IP Sockets Clients


The information in this article applies to:

  • Microsoft SQL Server version 4.2x


Microsoft SQL Server version 4.2 supports SQL Server network clients that connect using TCP/IP sockets. Examples of these are Sun, Macintosh, and Windows clients using TCP/IP. In these cases, the appropriate Sybase TCP/IP Network Library (Net-Library) for the specific version of TCP/IP sockets in use must be obtained from Sybase.

Microsoft SQL Server version 4.21 ships with Windows Sockets client Net- Libraries. The Windows Sockets Net-Library for Windows is supported on Windows for Workgroups version 3.11 with Microsoft TCP/IP for Windows for Workgroups version 1.0, and the Windows 3.1 subsystem (WOW) of Windows NT version 3.1 and Windows NT Advanced Server version 3.1. The Windows Sockets Net-Library for Windows NT is supported on Windows NT version 3.1 and Windows NT Advanced Server version 3.1.

The Microsoft TCP/IP socket Net-Library for MS-DOS is supported for MS-DOS- based applications running on Windows for Workgroups 3.11 with Microsoft TCP/IP for Windows for Workgroups version 1.0, but is not compatible with the MS-DOS environment of Windows NT.

The Windows Sockets Net-Libraries have been extensively tested on the supported platforms for connecting to Microsoft SQL Server. Support for other TCP/IP protocols that support Windows Sockets is planned for future releases. Using these Net-Libraries with other TCP/IP protocols or to connect to other than Microsoft SQL Server has not been extensively tested, and their use in these ways is not guaranteed.

Using named pipes as the IPC (Interprocess Communications) method on top of Microsoft TCP/IP is preferred, because features such as integrated security and adjustable packet size are available only with named pipes.

See the SQL Server for Windows NT 4.21 Readme.txt file for more information.


Instructions for Server-side Setup

  1. Ensure the TCP/IP protocol is enabled according to the instructions in your Windows NT documentation. In brief, this consists of using the Windows NT Control Panel Network applet to install and configure the Microsoft TCP/IP transport protocol.
  2. Use Regedt32.exe to edit the TCP/IP "keep-alive" setting in the Windows NT registry. This is necessary because in the absence of network traffic between client and server, Windows NT TCP/IP will disconnect from the client. The default disconnection period is 120 seconds.

NOTE: For additional information, please see the following article in the Microsoft Knowledge Base:

Q105794 Dropping Connections from Sybase TCP/IP Socket Clients

To edit the TCP/IP "keep alive" setting:

  • Add the following registry entry:


Or modify it, if you already have one, in the following path:


  • Set it to the number (in seconds) you prefer. To keep the connection alive forever, you should set the value to zero.

For more information on the Windows NT network configuration issues such as TCP/IP, see your Windows NT documentation.

  1. Install SQL Server according to the instructions in the SQL Server Configuration Guide.
  2. Either during or after server installation, use the SQL Server Setup program and select the Change Network Support option. If this option is not available (greyed out), you may have the Desktop version of SQL Server, which does not support networked connections. Another possible cause of the Change Network Support option being unavailable could be if you use full integrated security, which does not allow the use of IPC (Interprocess Communications) techniques other than named pipes.
  3. In the Install/Uninstall Networks dialog, select the TCP/IP Sockets checkbox. It is not necessary to use the Client Configuration Utility on the SQL Server to select a different default network.

Instructions for Client-side Setup:

For clients using non-Microsoft versions of TCP/IP, you must generally obtain the correct Sybase sockets Net-Library for your version of TCP/IP sockets from Sybase. Install this according to the platform-specific instructions that come with the Sybase Net-Library for your particular system.

The Microsoft SQL client utilities, such as SQL Administrator, SQL Object Manager, and ISQL/W, are only supported for use with Microsoft SQL Server.

Network clients using Microsoft TCP/IP can use the named pipes Net-Library which ships with Microsoft SQL Server, since Microsoft TCP/IP supports named pipes. Non-Microsoft versions of TCP/IP will require a Sybase sockets Net-Library. Microsoft SQL Server version 4.21 ships with client sockets Net-Libraries for MS-DOS, Windows for Workgroups version 3.11, and Windows NT clients. These are supported only for Microsoft TCP/IP and only for connecting to Microsoft SQL Server.

For Clients Using Microsoft TCP/IP:

  1. Install the Microsoft TCP/IP Networking software according to the accompanying instructions. Verify you can ping the SQL Server machine using the ping utility, which ensures the physical, data link, and network layers are working.
  2. Use the SQL makepipe/readpipe test programs according to the instructions in the SQL documentation to verify named pipes connectivity from client to server. Using makepipe/readpipe as a connectivity test is possible even if you do not plan on using named pipes as your IPC, because pipes support is integral to Microsoft TCP/IP. If this program fails, or gives an error code, you have a non-SQL network or network configuration error, and you should work with your primary network support provider to resolve this.
  3. After makepipe/readpipe works successfully, install the SQL Server client setup disk for the client operating system you have. This will allow connection to SQL Server over TCP/IP using named pipes. There are separate client utilities setup disks for MS-DOS, Windows, and OS/2. Windows NT clients use the SQL Server Setup Disk One. No further client SQL configuration changes are needed, as named pipes are the default Net-Library.
  4. If you want to connect to SQL Server via Windows sockets, use the Client Configuration Utility "Advanced" option.

Under Server: Enter the name of your SQL Server. Under DLL Name: Enter dbmssoc3. Under Connection String: Enter the IP address of your SQL Server, followed by the correct socket number.

For SQL Server version 4.21, this is usually 1433. Example of connection string entry:,1433. For connecting to pre-4.21 versions of SQL Server, the default socket number was 3180. See the SQL Server version 4.21 'readme' file for more information.

The above instructions are unchanged whether you use Windows NT or Windows NT Advanced Server.

Additional query words: 4.20 Windows NT connectivity sqlfaqtop

Keywords : kb3rdparty kbinterop
Issue type : kbinfo
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ420OS2

Last Reviewed: October 23, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.