This article was previously published under Q68941
When a workstation client application has problems connecting to SQLServer, the question first asked is, "How do I determine if this is aproblem with my network software, or if this is a problem with SQLServer?" The following instructions explain how to test the networkand local named pipes to help isolate network software problems.
Testing network named pipes
There are two utilities shipped with SQL Server designed to help test network named pipes. The MakePipe.exe and ReadPipe.exe 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.exe runs on Microsoft Windows NT, ReadpPipe.exe 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.exe. If the SQL Server tools are installed, ReadPipe.exe is located in the \Mssql\Binn directory; no icon is created for it.)
The MakePipe.exe and ReadPipe.exe utilities are not installed by SQL Server 2000 Setup. They can be found in the x:\x86\Binn directory on the SQL Server 2000 compact disc.
Used together, these utilities test the integrity of the network namedpipe services. To use these utilities, perform the following steps:
Go to the SQL Server database server, and type makepipe at the DOS command-line prompt. The Makepipe program will return:
Making PIPE:\pipe\abc read to write delay (seconds):0 Waiting for Client to Connect...
Go to the DOS command-line prompt and type
readpipe /Sservername /Dstring
where servername is the network name of the SQL Server on which Makepipe was just run, and string is a test character string. This string must be enclosed in quotation marks if it contains spaces. Note that 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 named "data", type either of the following:
readpipe /Sdata /Dhello
readpipe /Sdata /D"hello there"
If a network named pipe connection can be established, the workstation returns
SvrName:\\data PIPE :\\data\pipe\abc DATA :hello Data Sent: 1 : hello Data Read: 1 : hello
and the SQL Server returns:
Waiting for client to send... 1 Data Read: hello Waiting for client to send... 2 Pipe closed Waiting for Client to Connect...
The server is now waiting for another client to connect, and theReadpipe program can be run from other workstations. When all testingis complete, go to the screen where the Makepipe program is stillrunning and press CTRL+BREAK or CTRL+C to halt execution.
If the results are different from step 3 above, the network named pipeservices are not established. Clients will not be able to connect to SQLServer until named pipes are available. In addition, these utilitiesmerely attempt to open and use a named pipe. They do not stress thisnamed pipe connection. Thus, although these tests may succeed, thenetwork connection may break under a heavy load.
Testing Local Named Pipes
One last test is to connect to the SQL Server on the server machine using local pipes. The following will make a local ISQL connection to the SQL Server when run at the DOS command-line prompt on the database server machine:
isql /S /Ulogin /Ppassword
To make a local connection using ISQLW (SQL 6.5) or Query Analyzer (SQL 7.0), enter "(local)" or "." (without the quotation marks) in the Server Name field in the Connect To SQL Server dialog box.