Access to stored procs on different database servers
-
Hi, I have a scheduled job set to run on server A, with 5 steps. One of the stored procs in this job, step 4 is taking a long time to complete, we moved it to another which does not take much time to execute. Now we are trying to change this step so it uses the other server B. So on server A, I tried something like this -- exec serverB.database.dbo.sp_load_data. This is not working. Is there a way to execute stored proc on another server? Thanks!
-
Hi, I have a scheduled job set to run on server A, with 5 steps. One of the stored procs in this job, step 4 is taking a long time to complete, we moved it to another which does not take much time to execute. Now we are trying to change this step so it uses the other server B. So on server A, I tried something like this -- exec serverB.database.dbo.sp_load_data. This is not working. Is there a way to execute stored proc on another server? Thanks!
It looks like you're using SQL Server so setting up a linked server on Server A should be all you need.
-
It looks like you're using SQL Server so setting up a linked server on Server A should be all you need.
-
I am new to Linked servers. If you have an article or some sort handy could you please post it. Thanks so much for your time.
-
I see something set up for tables and view thru Linked servers. I am using a stored proc. how would we do that?
Once the link is setup it can be called by
EXEC [linkedserver\instance].database.schema.sp
I find it best to put [] around the linked part so I do not forget if I have a named instance (as shown).
-
Once the link is setup it can be called by
EXEC [linkedserver\instance].database.schema.sp
I find it best to put [] around the linked part so I do not forget if I have a named instance (as shown).