Linked server isn't necessary in this particular case -
he states that the databases are hosted by same SQL
Server instance on the same machine (at least that is how
I understood the question). Fully qualifying the table
names should suffice.
(ansi92 sql)
SELECT [some stuff]
FROM [database].[owner].[table] a,
[database].[owner].[table] b
WHERE
a.[field] = b.[field]
Even if the databases are on two distinct machines,
linked servers aren't always necessary. Simply use the
OPENROWSET or OPENDATASOURCE function where you'd use a
linked server. But I would agree that if you are joining
these tables all the time, or executing distributed
transactions, linking the servers is probably the best
approach.
Overall, I agree with Ignacio, though, this has nothing
to do with C# ;-) Hope we helped anyway.
JKJ, MCSD.NET
-----Original Message-----
As long as your 'initial catalog' database server
contains the linked server entry - which can be
configured with pre-defined login credentials, then
you're fine.
Cheers,
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com
---
Posted using Wimdows.net Newsgroups -
http://www.wimdows.net/newsgroups/.