INF: QS0436: Procedure for Testing Named Pipes

ID Number: Q68941

1.10

OS/2

======================================================================

QS0436: PROCEDURE FOR TESTING NAMED PIPES

======================================================================

Revision Date: 8/91

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

| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY |

| ACCOMPANY THIS DOCUMENT (collectively referred to as an |

| Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY |

| KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |

| THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |

| PARTICULAR PURPOSE. The user assumes the entire risk as to the |

| accuracy and the use of this Application Note. This Application |

| Note may be copied and distributed subject to the following |

| conditions: 1) All text must be copied without modification and |

| all pages must be included; 2) If software is included, all files |

| on the disk(s) must be copied without modification [the MS-DOS̉ |

| utility DISKCOPY is appropriate for this purpose]; 3) All |

| components of this Application Note must be distributed together; |

| and 4) This Application Note may not be distributed for profit. |

| |

| Copyright 1991 Microsoft Corporation. All Rights Reserved. |

| Microsoft, MS-DOS, and the Microsoft logo are registered |

| trademarks and Windows is a trademark of Microsoft Corporation. |

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

INTRODUCTION

============

When a workstation client application has problems connecting to SQL

Server, the question first asked is, "How do I determine if this is a

problem with my network software, or if this is a problem with SQL

Server?" The following instructions explain how to test the network

and 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 utility is installed during

setup of the SQL Server server software. The READPIPE.EXE utility is

installed during setup of both DOS and OS/2 workstations.

Used together, these utilities test the integrity of the network named

pipe services. To use these utilities, perform the following steps:

1. Go to the SQL Server database server, and type makepipe at an OS/2

command-line prompt. The Makepipe program will return:

Making PIPE:\pipe\abc

read to write delay (seconds):0

Waiting for Client to Connect...

2. Go to the DOS or OS/2 workstation 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"

3. 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 the

Readpipe program can be run from other workstations. When all testing

is complete, go to the screen where the Makepipe program is still

running and press CTRL+BREAK or CTRL+C to halt execution.

If the results are different from step 3 above, the network named pipe

services are not secure. Clients will not be able to connect to SQL

Server until named pipes are available. In addition, these utilities

merely attempt to open and use a named pipe. They do not stress this

named pipe connection. Thus, although these tests may succeed, the

network connection may break under a heavy load.

Testing Local Named Pipes

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

One last test is to connect to the SQL Server on the OS/2 server

machine using local OS/2 pipes. This can be done by using a null (or

blank) server name. For example, the following will make a local ISQL

connection to the SQL Server when run at an OS/2 command-line prompt

on the database server machine:

isql /S /Ulogin /Ppassword

To make a local connection using SAF, leave the Server Names field

blank (filled with dots) in the Login To SQL Server dialog box.