SQL Query Help..!

trying to do it by connecting to each separate server each time is going to be a nightmare for a whole variety of reasons, as well as horrendously inefficient.

Pull the data in to a central table once then link to that, it would be so much better...

Right...

So how do I do that?
 
Right...

So how do I do that?

That is somewhat like asking 'how long is a piece of string'. Exactly how you would do it depends on what tools you have access to, how the network to connect to the remote servers is configured, what programming languages you are familiar with and how you want to treat the data once you have it.

Essentially, you are looking to create the basics of a rapid update data warehouse, and that's quite a complex thing.

The alternative, managing the 160 connections via VBA in Excel is going to be horrendously slow and error prone. Not impossible, but also not pleasant.
 
Do you have access or experience (ha!) with SSIS (SQL Server Integration Services)?

Probably how I would do it (rather than going for a "proper" app in PHP/C#/VB)
 
In a nutshell I am trying to connect to 160 servers SQL database, extract a figure from a specified table & column (same DB, table and column on every server) and then display it. I want it to displayu so I can distinguish which server the figure came from.

Does that make more sense?

You can create a link in your local DB to each remote DB using sp_addlinkedserver. You can then query each remote DB using something like:

Code:
select *
from linkname1.table1, linkname2.table1
where ...
 
Hi,

Just to clarify, you can from your location connect to each server?

Can you give me an example of how you'd run the query and steps you take to connect to one of the servers?

Regards
 
Back
Top Bottom