469,909 Members | 1,630 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

Linking two databases and copying details to third database

Hi ,

there is one table (T1) in database DB1, another table T2 in DB2 , i want to run a query which select data from these two tables and copy/ place this data into third table T3 in DB3.

All Databases are residing in different servers.

i tried sp_addlinkedserver, but unable to solve the problem.

can anybody please tell me the steps to be follow to solve this problem.
Feb 11 '08 #1
5 964
debasisdas
8,127 Expert 4TB
Did you run the query from DB3 ?
Feb 11 '08 #2
I need to run query in DB3,

linking the two databases(in diff. servers) will only resolve the issue.

if i take another path like
copy the ID, nad other needed data in temporary table in DB2 and then selecting data from the two tables(which now be in same database) can be done .

but it involves copying huge amount of data in live server and then again selecting copying data to third server's database(which is very time consuming)

please guide me as i am novice player in this area.

tnx.
Feb 11 '08 #3
ck9663
2,878 Expert 2GB
If this is a one time thing, just use DTS and transfer all the tables you need from DB1 and DB2 into DB3, then do your query in DB3. If this is more of recurring thing, you're right, you have to link the server. Could you post here what you have done so far?

-- CK
Feb 12 '08 #4
this is gotng to be a regular thing on daily basis.

i tried to link the server , but its not linking.
I tried to link server in Security ->Linked server in enterprise manager.

but its not working , means i can see the servers in the list but i cannot work.( i am lost)

please illustrate the steps and if possible the code used and where to write that code would be very greatful.

please help me as i have just started working in SQL 2000.
Feb 12 '08 #5
ck9663
2,878 Expert 2GB
Have you tried this ?

-- CK
Feb 12 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by diskoduro | last post: by
1 post views Thread by Daveyk0 | last post: by
17 posts views Thread by Mitas Nikos | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.