Named Pipes Client Connections

The following procedure describes how to test a network connection when using Named Pipes as the IPC mechanism.

To test a Named Pipes connection

When using net view, servername is the name of the server to which you want to connect.

For example, to check the connection between a Named Pipes client and a server named \\SEATTLE1, type the following on the client:

net view \\SEATTLE1

If the connection is open, the output looks something like this:

Shared resources at \\SEATTLE1

SQL Server

Sharename      Type            Used as  Comment

----------------------------------------------------

PUBLIC         Disk                     Public Files

The command completed successfully.

To verify connection to a server’s named pipe

When using net use, servername is the server to which you want to connect.

For example:

net use \\SEATTLE1\IPC$

The command completed successfully

If the connection between the client workstation and the server is open but you still cannot connect to Microsoft® SQL Server™, test the network and local named pipes using the makepipe and readpipe utilities.

Two utilities included with SQL Server are designed to help test the integrity of network named pipes. The makepipe and readpipe utilities are installed during installation of both the client and server components. There are different versions of these utilities for the different operating systems on which they run: makepipe runs on Microsoft Windows NT®; readpipe runs on Windows NT, Microsoft Windows®, and MS-DOS®. Be sure to use the correct version for the operating system that you are testing. (The version that runs on Windows is named readpipe. If the SQL Server tools are installed, readpipe is located in the \Msqql7\Binn directory; no icon is created for it.)

To test the integrity of the network named pipe services

  1. At the operating system command prompt on the server, type:

    makepipe

    The makepipe utility returns the following information:

    Making PIPE:\pipe\abc

    read to write delay (seconds):0

    Waiting for Client to Connect...

      

    SQL Server is waiting for a client to connect.

  2. At the operating system command prompt on the client workstation, type:

    readpipe /Sserver_name /Dstring

    When using readpipe, server_name is the network server name of the SQL Server on which makepipe was started and string is a test character string. If the string contains spaces, it must be enclosed in double quotation marks. There are no spaces between /S and the server name, and no spaces between /D and the string.

    For example, to connect to a SQL Server installation named MYSERVER, type one of the following:

    readpipe /Smyserver /Dhello

    readpipe /Smyserver /D"hello there"

    readpipe /Smyserver /D'hello there'

      

    The strings specified in the first two readpipe statements are treated identically.

    If a network named pipe connection can be established, the client workstation returns the following information to each of the commands above, respectively:

    SvrName:\\myserver
    PIPE   :\\myserver\pipe\abc
    DATA   :hello
    Data Sent: 1 : hello
    Data Read: 1 : hello

      

    SvrName:\\myserver

    PIPE   :\\myserver\pipe\abc

    DATA   :hello there

    Data Sent: 1 :hello there

    Data Read: 1 :hello there

      

    SvrName:\\myserver
    PIPE   :\\myserver\pipe\abc
    DATA   :hello
    Data Sent: 1 : 'hello
    Data Read: 1 : 'hello

      

    If a network named pipe connection can be established, the makepipe utility returns information similar to this:

    Waiting for Client to Connect...

    Waiting for client to send...  1

      

    Data Read:

    hello

      

    Waiting for client to send...  2

      

    Pipe closed

      

    Waiting for Client to Connect...

    Waiting for client to send...  1

      

    Data Read:

    hello there

      

    Waiting for client to send...  2

      

    Pipe closed

      

    Waiting for Client to Connect...

    Waiting for client to send...  1

      

    Data Read:

    'hello

      

    Waiting for client to send...  2

    Pipe closed

      

    Waiting for Client to Connect...

      

    At this point, SQL Server is waiting for a client to connect. The readpipe utility can be run from other workstations.

  3. When testing is complete, go to the server where the makepipe utility is running and press either CTRL+BREAK or CTRL+C.

If the results are different from those in Step 2, network named pipe services are not available. If you are using Named Pipes as the IPC mechanism, clients cannot connect to SQL Server until a Named Pipe is available. These utilities attempt to open and use a named pipe; they do not stress the named pipe connection.

See Also
Configuring Client Network Connections readpipe Utility
makepipe Utility  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.