Hi how can i set a query to retrieve data from 2 registrations ?
i am using the default sql server registration and an mdf database that i
connected. The data are distributed to the two databases.
Can anyone help me please ?Makis
Do the databases reside on the same Server?
If they do ,please run
INSERT INTO DataBase1.dbo.Table (....)
SELECT ... FROM DataBase2.dbo.Table2
"makis" <sera@.mind.gr> wrote in message
news:O54VPFaIGHA.2036@.TK2MSFTNGP14.phx.gbl...
> Hi how can i set a query to retrieve data from 2 registrations ?
> i am using the default sql server registration and an mdf database that i
> connected. The data are distributed to the two databases.
> Can anyone help me please ?
>|||Are those two SQL Server instances? Then use sp_addlinked server to create a
link between the instances, then by using properly qualified identifiers
(look up "identifiers" in Books Online) you can access data in either of the
databases (tables, etc.).
ML
http://milambda.blogspot.com/|||If "registrations" are meant with different servers, you have to
use/configure a linked server. Then you can extend the syntax from uri
by the following:
INSERT INTO Servername1.DataBase1.dbo.Table (....)
SELECT ... FROM Servername2.DataBase2.dbo.Table2
(four part notation)
If one server is local you sure can leave one Servername{0} out.
HTH, Jens Suessmeyer.|||Yep , I was by this statement
>The data are distributed to the two databases.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1138189932.137989.39870@.g44g2000cwa.googlegroups.com...
> If "registrations" are meant with different servers, you have to
> use/configure a linked server. Then you can extend the syntax from uri
> by the following:
> INSERT INTO Servername1.DataBase1.dbo.Table (....)
> SELECT ... FROM Servername2.DataBase2.dbo.Table2
> (four part notation)
> If one server is local you sure can leave one Servername{0} out.
> HTH, Jens Suessmeyer.
>|||the databases are in one server.
I meant that the data are spread accross the two databases.
I believe your query will help me, thanks for your help. Will post again if
any problems.
Thursday, March 8, 2012
Data between two sql registrations
Labels:
database,
default,
iconnected,
mdf,
microsoft,
mysql,
oracle,
query,
registration,
registrations,
retrieve,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment