Best way to sync two databases?

  • Hi,

    I have two SQL 2008r2 servers. They are mirror imges of each other (IP and name different).

    I need to sync all of the data in Database A (San Diego) to all the (changed) data in Database B (Florida).

    Whats the best way to only send the deltas/changed data between the two servers?

    My problem is that the pipe between the two locations is only 3mps and it's 900G of data. So, I can't do backup/restore.

  • Replication would be good option.

    ===============================================================

    "lets do amazing" our company motto..

  • are you looking for a ongoing solution or are you looking to do a one off sync? if its a one off then take a look at redgate software. Alternative it this is a ongoing thing then either replication or setting up a mirrored environment.

    ***The first step is always the hardest *******

  • Yes I would go with the replication as well.

    or you can use help of SSIS, with Lookups and Union.

    but again that would make your system slow, since you do not have enough streaming.

  • If possible, can you offer a lot more detail into the data status on the two databases and future intent?

    If you're looking at a complete overwrite on one of the databases, backup/restore (if feasible) is probably the best bet for a one-off. If you're looking to continuously have one of them be the System of Record (SOR) then Transactionally Replicate to the secondary from the primary (or mirror/snapshot). Merge replication will be necessary if both of these are active systems of record, and the confliction rules for that can get pretty hairy.

    With more information as to what you're doing, why this is necessary, and the final intent, we can help you evaluate a proper solution.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Thanks everyone.

    It's a one time pull/sync.

    I'm looking into redgates data compare.

    Will update.

    Thanks again guys for all the help and insight.

  • You can also look into using the TABLEDIFF.EXE utility that ships with SQL Server. It can compare tables in two different databases and generate the scripts to synch the data in the tables: http://msdn.microsoft.com/en-us/library/ms162843(v=sql.105).aspx.

  • Evil Kraig F (12/5/2012)


    If possible, can you offer a lot more detail into the data status on the two databases and future intent?

    If you're looking at a complete overwrite on one of the databases, backup/restore (if feasible) is probably the best bet for a one-off. If you're looking to continuously have one of them be the System of Record (SOR) then Transactionally Replicate to the secondary from the primary (or mirror/snapshot). Merge replication will be necessary if both of these are active systems of record, and the confliction rules for that can get pretty hairy.

    With more information as to what you're doing, why this is necessary, and the final intent, we can help you evaluate a proper solution.

    Send a physical backup tape to the other site and restore it. It'll be cheaper and quicker for this one-off.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (12/5/2012)


    Evil Kraig F (12/5/2012)


    If possible, can you offer a lot more detail into the data status on the two databases and future intent?

    If you're looking at a complete overwrite on one of the databases, backup/restore (if feasible) is probably the best bet for a one-off. If you're looking to continuously have one of them be the System of Record (SOR) then Transactionally Replicate to the secondary from the primary (or mirror/snapshot). Merge replication will be necessary if both of these are active systems of record, and the confliction rules for that can get pretty hairy.

    With more information as to what you're doing, why this is necessary, and the final intent, we can help you evaluate a proper solution.

    Send a physical backup tape to the other site and restore it. It'll be cheaper and quicker for this one-off.

    I agree, if you have tape media on each site then that's the easy way, or buy a cheap removable drive and send it to the second site with a backup, then restore. 😉 No sense going to all the trouble of replication or mirroring across a WAN if its a one time project.

Viewing 9 posts - 1 through 8 (of 8 total)

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