sql data compare

https://documentation.red-gate.com/sdc14

About SQL Data Compare

With SQL Data Compare, you can compare and deploy the data in two Microsoft SQL Server databases.

You can also compare a backup with a database, a scripts folder, or another backup.

 

Selecting tables and views

When you create a project and you have selected your data sources, you can specify which tables, views, and columns to compare.  

SQL Data Compare automatically maps tables and views with the same name and schema (owner).

The Tables & Views tab enables you to:

SQL Data Compare lists the tables and views in the source and target.

Tables and views with identical or similar names are displayed side-by-side:

 

 The upper pane displays tables and views that are fully Mapped or have Partial mapping. The lower pane displays Unmapped tables and views.

 

 

Selecting the comparison key

To match rows in the two data sources, SQL Data Compare requires a comparison key for each table or view.

SQL Data Compare automatically selects a comparison key when:

  • tables contain a matching primary key, unique index, or unique constraint
  • views contain a matching unique clustered index

For more information, see What's a comparison key?

 

Selecting the tables and views

Select the tables and views you want to compare by selecting or clearing the appropriate check boxes in the Compare column.

By default, the first time that you run a project all tables and views with identical or similar names are selected for comparison.

If the structure of the data sources you are comparing has changed while you are working on the project, click  Refresh to update the Tables & Views tab. For example, if a table has been added to the database, click  Refresh so that you can include the new table in the comparison.

If a table or view has been added to a database since you last ran the project, SQL Data Compare does not select the table or view by default.

 

实战

1.选择好source database和target database

2.切换到tables的tab,选择需要比较数据的表

 

 3.确定之后,会弹出数据对比页面。

下图中source14个变化,有385个不同,target有2个不同

我们关注的是source,所以把different和target勾选去掉。

 

 

4.切换到下面的only in left的tab,然后选择需要同步的数据行。 deploy

 

 

 

 

 

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(1038)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2015-09-10 git支持中文
点击右上角即可分享
微信分享提示