Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Best way to sync two databases? Expand / Collapse
Author
Message
Posted Wednesday, December 5, 2012 1:59 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 6:27 AM
Points: 867, Visits: 2,416
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.



Post #1393196
Posted Wednesday, December 5, 2012 2:10 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 4, 2016 11:29 PM
Points: 49, Visits: 347
Replication would be good option.

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




"lets do amazing" our company motto..
Post #1393205
Posted Wednesday, December 5, 2012 2:32 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 22, 2016 1:02 PM
Points: 274, Visits: 1,047
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 is always the hardest
Post #1393222
Posted Wednesday, December 5, 2012 2:36 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, March 8, 2016 10:23 AM
Points: 2,144, Visits: 613
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.
Post #1393223
Posted Wednesday, December 5, 2012 2:36 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, September 23, 2015 3:34 PM
Points: 5,467, Visits: 7,660
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 | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1393224
Posted Wednesday, December 5, 2012 3:03 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 6:27 AM
Points: 867, Visits: 2,416
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.



Post #1393233
Posted Wednesday, December 5, 2012 4:42 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Thursday, June 2, 2016 8:58 AM
Points: 652, Visits: 1,469
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.
Post #1393268
Posted Wednesday, December 5, 2012 4:58 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 10:52 PM
Points: 42,083, Visits: 39,479
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."

Helpful Links:
How to post code problems
How to post performance problems
Post #1393272
Posted Thursday, December 6, 2012 5:20 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 12, 2015 10:26 AM
Points: 42, Visits: 306
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.
Post #1393801
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse