SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stored Procedure At The Remote Server


Stored Procedure At The Remote Server

Author
Message
Dutta, Amartha
Dutta, Amartha
SSC Veteran
SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)

Group: General Forum Members
Points: 211 Visits: 110
I have two server
1. The Host Server (HS1) - SQL Server Instance
2. The Target Server (TS1) - SQL Server Instance.

Need to fetch data from a TS1. But can't create any objects inside any objects under TS1.

There are two options:
1. Create a dynamic SQL and execute over a connection to the TS1 server every time. Don't want this option as the SQL Server optimizations can't be utilized.

2. Write a stored procedure under HS1. The stored procedure should have queries which will fetch data from the TS1 over a linked server.

I will like to go with the second option but how can I make sure that the statements / stored procedure gets executed on the TS1 server box so that after the execution is over the results are only returned to the host server and thus the resources of the target server are used (high configuration server) and the transport over the network is kept at the minimum.

If you need more calrity please let me know.

Awaiting a reply or some pointers for a detailed go through.

Regards
danschl
danschl
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2046 Visits: 644
not 100 percent sure it what you are asking

but yes you can do exec ts1.dbo.stored_procedure on a linked server



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search