Discussion:
Executing a simple SELECT on different DB's
(too old to reply)
K Viltersten
2008-06-13 22:58:21 UTC
Permalink
I have two registered servers, Serv1 and Serv2.
When i right click any of them and choose
Connect->New Query and then execute:

SELECT * FROM donkey

i get the results for both of them. The only
thing is that i get the queries executed on
different tabs. How can i alternate the
following so i get results from the same
table but on diferent servers?

-- For server 1.
SELECT * FROM donkey

-- For server 2.
SELECT * FROM donkey

I've tried different approaches and syntaxes
suggested by different sources but somehow, i
managed to be more confused that what they
clarified. :)

Suggestions?
--
Konrad Viltersten
Eric Isaacs
2008-06-14 00:35:07 UTC
Permalink
Look into creating a linked server from one server to the other
server:
http://msdn.microsoft.com/en-us/library/aa213778(SQL.80).aspx

You can then refer to the other server from the server where the link
is defined.

Loading...