DavidLemire
Programmer
Hi Guys,
I have 2 SQL servers linked by a VPN. On one server, I need to run a SP every one minute on the other server. To do that, we decided a linked server would be best.
We want to know which one is most optimized between:
1. At run-time, create a linked server, open it, run query, close linked server, destroy definition.
2. Create linked server only ONCE. Then, at run-time, open linked server, run query, close linked server.
Put this way, I guess the second is obvious. However, my question is more on what is the most resource-consuming (every resource on target server counts!); is it having a linked server definition always on target server, or is it to create-destroy every time we need to run the stored procedure?
Thanks for info!
---
David Lemire, Consultant
System Technologies for Industry Inc.
I have 2 SQL servers linked by a VPN. On one server, I need to run a SP every one minute on the other server. To do that, we decided a linked server would be best.
We want to know which one is most optimized between:
1. At run-time, create a linked server, open it, run query, close linked server, destroy definition.
2. Create linked server only ONCE. Then, at run-time, open linked server, run query, close linked server.
Put this way, I guess the second is obvious. However, my question is more on what is the most resource-consuming (every resource on target server counts!); is it having a linked server definition always on target server, or is it to create-destroy every time we need to run the stored procedure?
Thanks for info!
---
David Lemire, Consultant
System Technologies for Industry Inc.