distributed query

  • Hi,

    Is it possible to use a distributed query to execute a stored procedure on another SQL server without using RPC?

    I have one dev server and production server. now, i want to execute a stored procedure which is there on prod from dev server.

    What are the ways we can accomplish this task??

    Thankz in advance.

  • I tried with Linked Server but it throwing me an error RPC not configured for the target server.

    EXEC [ServerName\SQL_01].ADVENTUREWORKS.DBO.TEST_SP

    Msg 7411, Level 16, State 1, Line 1

    Server 'ServerName\SQL_01' is not configured for RPC.

  • we can use osql for this purpose... or even try (xp_cmdshell)


    Thanks ,

    Shekhar

  • How it can achieved using xp_cmdshell or osql?

    Help!

  • using osql u can run a query or procedure on any sql server to which you have access...

    osql -S -U -P -w8000 -d -iS:\Data\Scripts\SDLKMove.sql -oSDLKMoveScript.txt

    run this in command prompt..


    Thanks ,

    Shekhar

  • mroja_2005 (8/24/2009)


    I tried with Linked Server but it throwing me an error RPC not configured for the target server.

    EXEC [ServerName\SQL_01].ADVENTUREWORKS.DBO.TEST_SP

    Msg 7411, Level 16, State 1, Line 1

    Server 'ServerName\SQL_01' is not configured for RPC.

    How about setting up RPC?

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Which option should be turned on to set up the RPC in SQL Server ?

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply