Monday, January 15, 2007

How to Compare Data in Databases Using Data Compare 2.5

Comparing at the database level helps to synchronize all tables in two databases. It is a fast and convenient way to merge data changes. Another option is to make a custom selection of tables to compare.

The database compare starts at the Compare Wizard by selecting the Databases Compare type and then making a selection of Custom table selection or Compare all tables.

You can view the list of all matching tables (matched by name) on the Database Compare form. If Compare all tables option is selected in the wizard then the number of matching, different, missing and additional rows in each table will be shown automatically. In case when the Custom table selection option is selected in the wizard you have to make a custom selection of the tables that need to be compared and then click on Summary Compare Selection button.

There is statistical information about the number of matching, different, missing and additional records besides each table name. The background color of the rows shows the compare status of each table:

- If the background color is white then the tables are same or they are not compared yet.
(Note: tables that are not compared do not have summarized numbers.)

- If the background color is red then one (or both) of the tables do not have a Primary Key.
(Note: only tables with primary key can be synchronized. If the table has unique identifier it may be used as a primary key for compare.)

- If the background color is light red then the tables are different.

For full (automatic) synchronization of selected tables use the Sync to Left and Sync to Right buttons. For example, Sync to Right will make the content of the Right database tables to be the same as the Left side database tables. That way the Left side tables become the source and the Right side tables are the target for the synchronization process.

For more details see:
http://www.sqlstudio.com/Data_Compare_Overview.aspx

No comments: