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

 

 

 

 

 

 

转载于:https://www.cnblogs.com/chucklu/p/11497704.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值