locked
Stored Proc - Calling a Remote Stored Proc RRS feed

  • Question

  • I am having trouble executing a stored procedure on a remote server. On my
    local server, I have a linked server setup as follows:
            Server1.abcd.myserver.com\SQLServer2005,1563

    This works fine on my local server:

    Select * From [Server1.abcd.myserver.com\SQLServer2005,1563].DatabaseName.dbo.TableName

    This does not work (Attempting to execute a remote stored proc named 'Data_Add':

    Exec [Server1.abcd.myserver.com\SQLServer2005,1563].DatabaseName.Data_Add 1,'Hello Moto'

    When I attempt to run the above, I get the following error:
    Could not locate entry in sysdatabases for database 'Server1.abcd.myserver.com\SQLServer2005,1563'.
            No entry found with that name. Make sure that the name is entered correctly.


    Could anyone shed some light on what I need to do to get this to work?

    Thanks - Amos.

    Thursday, August 24, 2006 2:36 PM

Answers

  • Amos,

    I believe you forgot to add .dbo. in the remote stored proc invocation, if you add that things will start working. Unless the name has 4 parts remote invocation would not happen, and server would assume that you are executing a local stored proc from database and not server  [Server1.abcd.myserver.com\SQLServer2005,1563].

    Thanks

    Waseem

    Thursday, August 24, 2006 7:56 PM

All replies

  • Amos,

    I believe you forgot to add .dbo. in the remote stored proc invocation, if you add that things will start working. Unless the name has 4 parts remote invocation would not happen, and server would assume that you are executing a local stored proc from database and not server  [Server1.abcd.myserver.com\SQLServer2005,1563].

    Thanks

    Waseem

    Thursday, August 24, 2006 7:56 PM
  • Yes that was it - thank you!

     

    Thursday, August 24, 2006 8:48 PM