updating changes from one database to another database in the same server

Posted by Pavan Kumar on Stack Overflow See other posts from Stack Overflow or by Pavan Kumar
Published on 2010-05-12T04:01:18Z Indexed on 2010/05/12 4:04 UTC
Read the original article Hit count: 390

Filed under:
|
|
|
|

I have a copy of client database say 'DBCopy' which already contains modified data. The copy of the client database (DBCopy) is attached to the SQL Server where the Central Database (DBCentral) exists. Then I want to update whatever changes already present in DBCopy to DBCentral. Both DBCopy and DBCentral have same schema. How can i do it programatically using C#.NET maybe with a button click. Can you give me an example code as how to do it?. I am using SQL Server 2005 Standard Edition and VS 2008 SP1.

In the actual scenario there are about 7 client database all with same schema as the central database. I am bringing copy of each client database and attach it to Central Server where the central database resides and try to update changes present in each copy of the client database to central database one by one programatically using C# .NET . The clients and the central server are physically seperate machines present in different places. They are not interconnected.

I need to only update and insert new data. I am not bothered about deletion of data.

Thanks and regards Pavan

© Stack Overflow or respective owner

Related posts about update

Related posts about sql-server-2005