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:
- map tables and views
- select the comparison key for each table or view
- select the tables and views that will be compared
- map specific columns
- select the columns that will be compared
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
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 |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2015-09-10 git支持中文