[AccessD] A2003: Run Query on multiple SQL Servers

Darren D darren at activebilling.com.au
Mon Dec 8 23:30:21 CST 2008


Hi Team

 

Using the owner and the dB name I can run a query against a few dB's at once

 

EG I can get the whole account list for 4 databases

 

Select * db1.dbo.from Account

Select * db2.dbo.from Account

Select * db3.dbo.from Account

Select * db4.dbo.from Account

 

Is there a way I can add a Server to this type of thing to get results from
different servers?

Drew posted something where the connection string was passed in the select
statement but I couldn't get that to work - that looked really cool

 

EG From a Server named OHIO

Select * OHIO.db1.dbo.from Account

Select * OHIO.db2.dbo.from Account

Select * OHIO.db3.dbo.from Account

Select * OHIO.db4.dbo.from Account

 

EG From a Server named DENVER

Select * DENVER.db1.dbo.from Account

Select * DENVER.db2.dbo.from Account

 

That way I can get the results from 6 dB's across 2 x servers

 

Many thanks in advance

 

Darren

 




More information about the AccessD mailing list