PRB: Remote Stored Procedure Call Fails with Error 7221

Last reviewed: April 30, 1997
Article ID: Q129604

The information in this article applies to:
  • Microsoft SQL Server, versions 4.2, 4.21, and 4.21a

SYMPTOMS

Under certain circumstances when you run a remote stored procedure, you could receive the following error on the SQL Server where the remote stored procedure is initiated:

   Msg 7221, Level 17, State 2
   Login to site '<server name>' failed

CAUSE

The conditions for this error to occur are:

  1. The SQL Server where the Remote Stored Procedure is initiated is running with the local system account.

  2. The Open Data Services (ODS) application that services the remote stored procedure is run on Windows NT version 3.5 or later.

This error occurs because SQL Server is not able to connect to the named pipe that the ODS application is listening on because, by default, the local system account has no permissions to connect to a named pipe on Windows NT version 3.5 or later on another computer.

WORKAROUND

In order to enable SQL Server to connect with the local system account, you should ensure that the named pipe that the remote ODS application is listening on is included in the NullSessionPipes value of the HKEY_LOCAL_MACHINE setting SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters for the server that is running the ODS application. You should then reboot that server.

For example, if you are running the sample ODS application PROCSRV on a server named NTSRV and listening on the named pipe \\.\pipe\procsrv\query, you would need to add procsrv\query to the NullSessionPipes value on the server NTSRV.


Additional query words: RPC
Keywords : kbtool SSrvLan SSrvNet_Lib
Version : 4.2 4.21 4.21a
Platform : WINDOWS


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: April 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.