I have two databases on the same server and would like to access data from
both. In oracle there is a 'dblink' function that allows you to do this. Wha
t
is the procedure in sqlserver ?
DonIf its the same server and the same instance you can use the epoint
notation, naming the object sas followed:
Databasename.Owner.ObjectsName
If you want to connect to a remote server you can also expand this to:
Servername.Databasename.Owner.ObjectsName
but therefore you have to configure a linked server.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"don" <don@.discussions.microsoft.com> schrieb im Newsbeitrag
news:D2D6750B-DF74-4B41-B578-864258273034@.microsoft.com...
>I have two databases on the same server and would like to access data
>from
> both. In oracle there is a 'dblink' function that allows you to do this.
> What
> is the procedure in sqlserver ?
> Don|||Assuming two databases in the same SQL Server instance: just qualify with th
e database name:
SELECT ...
FROM loctbl INNER JOIN otherdb.dbo.othertbl
...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"don" <don@.discussions.microsoft.com> wrote in message
news:D2D6750B-DF74-4B41-B578-864258273034@.microsoft.com...
>I have two databases on the same server and would like to access data fro
m
> both. In oracle there is a 'dblink' function that allows you to do this. W
hat
> is the procedure in sqlserver ?
> Don
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment