SQL Server Linked Server RPC Options?

19,034

Solution 1

An example of an RPC in this context is a stored procedure. To link another server and run an sp on it you'll need to set the RPC Out option.

-Anders

Solution 2

I know this is an old question but it returns as one of the first links on a search. I am just adding to @chankster answer to give a bit more detail and when to use it. I don't have enough rep. to post it as a comment yet. Same answer I gave on https://dba.stackexchange.com/a/107042/70662. According to a msdn blog the RPC vs RPC Out on a SQL Server linked-server is this:

  1. RPC - This setting is mainly for legacy feature called Remote Server. According to the blog it states you will not be using this in SQL Server 2005 and higher. Unless you get an error like:

18482 “Could not connect to server '%.*ls' because '%.*ls' is not defined as a remote server. Verify that you have specified the correct server name. %.*ls.”

  1. RPC Out - setting is very pertinent to linked servers on SQL Server 2005 and higher. If this is not enabled you can get the following error message:

Msg 7411, Level 16, State 1, Line 1 Server 'myLinkedServer' is not configured for RPC.

Which really should say RPC Out should be enabled.

Share:
19,034

Related videos on Youtube

Aaron Daniels
Author by

Aaron Daniels

I am a .NET developer with a lame sense of humor.

Updated on September 17, 2022

Comments

  • Aaron Daniels
    Aaron Daniels almost 2 years

    When setting up a linked server in SQL Server (we're on 2005), you can set two server options:

    • Rpc
    • Rpc Out

    Looking at the MSDN article, all it states is:

    RPC - Enables RPC from the specified server.

    RPC Out - Enables RPC to the specified server.

    My question is, why would I need to set these options? What can I do / not do by enabling Rpc on a linked server? Does setting these options to true have any drawbacks?

    EDIT:

    But to execute the remote stored procedure, you'd need the "RPC Out" setting enabled. When would you ever need the "RPC" setting enabled?

  • Ryan Ferretti
    Ryan Ferretti about 15 years
    There are many times when you may want to execute a stored procedure on a remote server. If you needed to make a bunch of changes to a remote database as part of a load process, executing a remote stored procedure would be the best method.
  • Aaron Daniels
    Aaron Daniels about 15 years
    But to execute the remote stored procedure, you'd need the "RPC Out" setting enabled. When would you ever need the "RPC" setting enabled?
  • chankster
    chankster about 15 years
    When the linked server is more like a partnership than a client/server relationship.