merging two databases

倖福魔咒の 提交于 2019-12-25 05:24:38

问题


I have two distinct mssql databases with identical schemas but different data on one system. I want to merge the data between the two databases by adding the data from one into the other.

I tried to use Redgate Data Compare but couldn't find any instructions how to do it.

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


回答1:



xSQL Software has developed a set of tools for this type of database operations. You can use xSQL Data Compare. To achieve the result you require you specify the left and right database, do the compare and then, to add the data that are missing from the left db to the right db you need to uncheck sync for the right rows and generate and execute the script.
Here you can see the rows unchecked:

And as you can see, the script does not generate any DELETE statements, only INSERTS for the rows that are missing on the right DB

Hope this helps!
Disclosure: I'm affiliated to xSQL Software



来源:https://stackoverflow.com/questions/36514895/merging-two-databases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!