How to sync two databases?

  • I have two identical databases in QA and in production.

    Database in production has items, orders, and customer information.

    Database in QA is exactly the same database where users create new items. How can I sync QA data into production? I cannot just back it up and restore in production because I will lose order/customer info.

    I only need to sync certain tables. I cannot also delete from production tables and copy data from QA because records have id's that are keys so I need to update existing records, insert new records and delete records that do not exist in QA.

    Provided I can copy QA tables into production, how can I merge those changes?

  • Red Gate SQL Data Compare will generate DELETE, UPDATE and INSERT statements to synch databases.

  • It cost too much

  • You have two options replication which comes with latency issues and automated SSIS package using trigger in SQL Server 2005 to add changed data or use SQL Server 2008 CDC(change data capture).

    Kind regards,
    Gift Peddie

  • Replication is exactly what you are looking for. Make sure you have PK's on your tables.

    -tjm

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply