Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 open query with parameters

Author  Topic 

tracmonali
Starting Member

16 Posts

Posted - 2012-05-16 : 08:01:10
I wish to execute a stored proc with parameters, using linked server and open query stmt. Any other suggestions for following scenario are welcome:
I am running a store proc on one server. This stored proc is calling another stored proc (with sending parameters) on remote server. This remote server is connected using linked server and an open query stmt.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-05-16 : 08:46:14
EXEC [LinkedServerName].DatabaseName.DBO.StoredProcedureName 'Parm'


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-16 : 20:46:08
see

http://blog.sqlauthority.com/2007/10/06/sql-server-executing-remote-stored-procedure-calling-stored-procedure-on-linked-server/

also make sure you've RPCOut property set to true if you want to execute remote procedure from linked server

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tracmonali
Starting Member

16 Posts

Posted - 2012-05-17 : 22:29:17
Thanks. How would I put the records from remote stored proc thru linked server onto the temp table on the current server?
Go to Top of Page
   

- Advertisement -