Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Best way to sync two databases?


Best way to sync two databases?

Author
Message
krypto69
krypto69
SSC Eights!
SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)

Group: General Forum Members
Points: 869 Visits: 2420
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.



jnuqui
jnuqui
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 347
Replication would be good option.

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




"lets do amazing" our company motto..
SGT_squeequal
SGT_squeequal
SSC Veteran
SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)SSC Veteran (276 reputation)

Group: General Forum Members
Points: 276 Visits: 1047
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 hardestw00t
pchirags
pchirags
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2166 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.
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5697 Visits: 7660
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
krypto69
krypto69
SSC Eights!
SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)SSC Eights! (869 reputation)

Group: General Forum Members
Points: 869 Visits: 2420
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.



George M Parker
George M Parker
SSChasing Mays
SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)SSChasing Mays (660 reputation)

Group: General Forum Members
Points: 660 Visits: 1469
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.
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45071 Visits: 39906
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
SQL-Squid
SQL-Squid
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
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. Wink No sense going to all the trouble of replication or mirroring across a WAN if its a one time project.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search