Updating changes from one database to another database on the same server
I have a copy of a client database that says "DBCopy" which already contains the changed data. The client database copy (DBCopy) is attached to the SQL Server where the Central Database (DBCentral) exists. Then I want to update all changes already present in DBCopy for DBCentral. Both DBCopy and DBCentral have the same schema. How can I do this programmatically using C # .NET, perhaps by clicking a button. Can you give me some sample code on how to do this? I am using SQL Server 2005 Standard Edition and VS 2008 SP1.
In a real-world scenario, there are about 7 client databases with the same schema as the central database. I bring a copy of each client database and attach it to a central server where the central database resides and am trying to update the changes present in each copy of the client database to the central database one at a time programmatically using C # .NET. Clients and the central server are physically separate machines, present in different locations. They are not related.
I only need to update and insert new data. I am not worried about deleting data.
Thank you and welcome Pavan
a source to share
If it's a one-time or infrequent sync, I would use a third-party tool like Red-Gate SQL Data Compare. If this is meant as always synchronization, then I would recommend replication or the Synchronization Framework .
a source to share