Question Locked

How do I query from more than one server

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Using SQL how would you make a query where your using the ip address as part of your table name in the select portion of the query?

Example

I have on IP xxx.xx.xx.xx DB1 table1 field1, field2

and

I have on IP zzz.zz.zz.zz DB2 table2 field1, field2

both servers are behind my fire wall and i can query them individually

I hope this makes sense.

3 replies

by jaqui

have a connect to each server
then you can connect ip 1 select [query] from [db1]
and connect ip 2 select [query] from [db2]

by tony hopkinson

SQL server for instance expects you to 'register' remote servers with an alias and use that.

So which DBMS are you using ?

This discussion is closed to new replies.