4

Suppose I have two distinct databases with identical schemas but different data. I want to merge the data between the two databases by adding the data from one into the other. Foreign key relationships, etc. need to be maintained when the data is migrated.

Are there any tools (or databases that have built-in tools) to make this job fairly simple?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Fragsworth
  • 33,919
  • 27
  • 84
  • 97

4 Answers4

4

Red Gate SQL Data Compare

Best tool I have found for this type of thing, hands down.

JohnFx
  • 34,542
  • 18
  • 104
  • 162
1

This functionality is built into Windows Team System (the database edition or the suite). I have tried both this and an older version of Red Gate's SQL compare and both are awesome to work with. There are also some free tools (see this thread) but I do not have experience with any of them

Community
  • 1
  • 1
Jason Irwin
  • 1,985
  • 2
  • 29
  • 42
1

2 options that I know of:
1. You can use SQL Server Data Tools. For instructions on how to compare data take a look here.
2. Another option which is xSQL Data Compare. For an explanation on how to use it, check out my answer here.


Disclosure: I'm affiliated to xSQL

Community
  • 1
  • 1
Endi Zhupani
  • 736
  • 2
  • 7
  • 22
0

Visual Studio Team/Database versions have schema/data comparison tool.

Codism
  • 5,928
  • 6
  • 28
  • 29