PRB: Issuing RPC to Local Server Executing Sp_sqlexec May Fail

Last reviewed: January 23, 1998
Article ID: Q179149
The information in this article applies to:
  • Microsoft SQL Server, version 6.5

SYMPTOMS

Executing the sp_sqlexec stored procedure through a remote procedure call (RPC) to the local server will fail with message 18484 if all of the following conditions are true:

  • SQL Server is using Mixed or Standard security.
  • SQL Server startup is set to a domain user or System account.
  • The system administrator (SA) login password is not null.
  • The client is using a trusted connection.

For example, if the following statement is executed on local server LOSERVER

   exec LOSERVER.master..sp_sqlexec "select * from sysprocesses"

The following error message will appear:

   Msg 18484, Level 14, State 1
   Unable to connect to site 'LOSERVER' because login failed.

WORKAROUND

To work around this problem, do any one of the following:

  • Add logic in the application to not issue an RPC with sp_sqlexec if the target server is the local server.
  • Use the EXEC statement instead of the sp_sqlexec stored procedure.
  • Connect to SQL Server using Standard security instead of a trusted connection.
  • Only use Integrated security.


Additional query words: execrpc st proc stproc
Keywords : SSrvStProc
Version : WINNT:6.5
Platform : winnt
Issue type : kbprb
Solution Type : kbworkaround


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