Hello, I am trying to develop UI in C# .NET to synchronize 7 instances of backup databases with the central database one by one (All holding same schema) .The backup database( all 7 instances client databases) which is brought to the central server in a removable device such pendrive will consist of mdf and ldf files from each client and will be attached to the server where the central database resides. After all the client backup databases are attached i need to synchronize(update existing data or insert new data to the central database residing in server) each backup database one by one to central database. I want to know as how i can synchronize betweeen a backup database with a central database using C# .NET
Assuming that you will not be altering data from the other 6 databases via each instance you could keep some kind of log of record changes, read that and then update your central database based on the information stored in your log for each database.
If you also need to be updating each of the other 6 instances from each loaded instance, then you'll need to perform an aggregation of the overall changes then send them to each other.
you could also use row versioning to do compares of data, and load it to your central one via that (but you'll need to read rows of each table to find this).
If you also need to update data from your central database -> your client ones you could use a similar technique.
Edit To perform the actual Update you will need to have a DataReader open to your "Source" database that finds the records. Then from this object create a secondary reader that "select *modified * columns from each of the designated tables" and read that You then create a command object and ExecuteNonQuery against your Destination database.