Reply to Re: Access to different databases in different domains

Your name:

Reply:


Posted by Erland Sommarskog on 04/16/07 22:25

Josef Meierhofer (jmeierhofer@gmx.com) writes:
> there are several SQL-Server 2000 databases within a company located
> on different servers in different domains. On every database you can
> find the same table X.
>
> I want to merge these tables X (UNION query) and print the result with
> a Crystal Report.
>
> Unfortunately I only have little knowledge on security, domains,
> distributed applications.

The query as such is not tricky:

SELECT ....
FROM SERVER1.db.dbo.tbl
WHERE ....
UNION ALL
SELECT ....
FROM SERVER2.db.dbo.tbl
WHERE ....
UNION ALL
...

The problem may be with setting up the linked servers. You use
sp_addlinkedserver and sp_addlinkedsrvlogin. Supposedly there is a DBA
around with whom you can discuss how to do this.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация