Click here to Skip to main content
15,887,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to replicate data from 2 database into a single database


Scenario

We have developed an application for Transport Company. They have two location in two town.

We have a databases at each of locations.

We need to transfer data at regular intervals from these individual databases into our main database at a centralized place .

What would be the best solution for the above scenario


--
Thanks
Anoop Nair

Life is a challenge, and I’m staying in the game to win.
Posted
Comments
sandipapatel 4-Dec-10 3:56am    
I was facing same problem in restoring older database to current one.
I was using queries for selecting all data from same named table from both database and then comparing them and updating current db accordingly if new values are available or values are changed for rows.

New Approach:
You can map your database schema (all tables and fields) to an XML file.
Then go -----------
foreach node in xmlnodeofthexmlfile
getdata and compare for both db's same named tables.

It will be very easy. Try out this 1 as 1 organization is using this approach as I heard from my friend who's working in it. You won't need modification in this module ever even if u change the database schema. U need to simply update the XML file only.
fjdiewornncalwe 6-Dec-10 9:42am    
A good suggestion in a disconnected environment. Just as a question because you haven't put this information in your question... Are the two satellite servers and the main server connected via internet in any way or can be? If you are fortunate enough to have that you could investigate Replication as a potential solution as well.

1 solution

Yes they are connected via internet

We are also trying for replication in Sql Server 2005.

But we need to get data from 2 different Db's into a single DB

This is causing us a problem due to indentity column and primary ley columns
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900