Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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 05, 2012 1:59 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, April 11, 2014 12:13 PM
Points: 697, Visits: 1,721
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 05, 2012 2:10 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, November 29, 2013 2:53 AM
Points: 49, Visits: 203
Replication would be good option.

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




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


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 2:13 PM
Points: 268, Visits: 991
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 05, 2012 2:36 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, April 14, 2014 8:59 AM
Points: 1,670, Visits: 550
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 05, 2012 2:36 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:16 PM
Points: 5,986, Visits: 6,931
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 05, 2012 3:03 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, April 11, 2014 12:13 PM
Points: 697, Visits: 1,721
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 05, 2012 4:42 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, November 19, 2013 8:15 AM
Points: 653, Visits: 1,428
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 05, 2012 4:58 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:34 AM
Points: 35,955, Visits: 30,246
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." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

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

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, April 11, 2014 9:02 AM
Points: 42, Visits: 137
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