Altova DiffDog 2024 Enterprise Edition

Running a Database Data Comparison

Home Prev Top Next

A database data comparison in DiffDog consists of the following steps.

 

Step 1: Connect to the "left" and "right" databases

1.On the File menu, click Compare Database Data. (Alternatively, click the Data Comparison ic_data-comparison toolbar button.) Follow the database wizard steps to connect to the database (see Connecting to a Database).

2.When prompted to select database objects for comparison, first choose a data source from the Data Source list, and then select the check boxes next to the objects you want to include for comparison. The Data Source list displays any active data sources that you've connected since starting DiffDog.

dbdiff_compare_data_02
Note:From the dialog box above, you can optionally group, filter, or navigate database objects using the buttons above the database tree structure. For more information, see Navigating Database Objects.

 

3.Click either Left Side or Right Side to add the data source to the left or right side of the comparison, respectively, and then click OK. Be patient while DiffDog adds the selected objects to the comparison; this may take a while for large databases. At this stage, only one of the comparison components has an assigned data source (right or left, depending on what you selected).

dbdiff_compare_data_04

4.Click the Browse diff_browse_button button of the empty component, and choose the second data source from the Data Source list, if one is available. Otherwise, click Quick Connect ic_quick-connect and follow the wizard steps to connect to the second data source.

5.Select the check boxes next to the tables you want to compare.

 

If the databases to be compared are SQLite or Access, you can also perform this step from Windows Explorer, see Quick Comparison of SQLite and Access Databases.

 

Step 2: Map the objects to be compared (if applicable)

To perform a comparison, the objects on the left and right side of the comparison must be connected by a line (a "mapping"). The mapping instructs DiffDog to compare these two objects specifically. By default, DiffDog will attempt to match automatically the objects to be compared by their name, and thus create the corresponding mappings. The mapping options can be adjusted from Tools | DiffDog Options | Database Comparison. When necessary, you can create mappings manually, or adjust the existing ones. For example, you may need to create a mapping manually between two objects if the object names are different in the "left" as opposed to the "right" database.

 

To create a mapping, click the triangle on the left component and, holding the left mouse button pressed, drag it to a target triangle on the right component. To delete all mappings of a comparison, right-click the title bar of either component and choose Unmap items from the context menu. To delete a single mapping, right-click the appropriate object and choose Unmap selected from the context menu. Alternatively, click the connection line between two mapped objects and press Delete.

 

Note:Unmapping a table will also unmap all columns of that table.
dbdiff_compare_data_15

Mappings in a data comparison

 

Step 3: Run the comparison

Once the mappings between objects are created, you can run the comparison as follows:

 

On the Diff and Merge menu, click Start Comparison. (Alternatively, click the Start Comparison ic_start-comparison toolbar button, or press F5.)

 

At this stage, you can either explore the comparison results in more detail (see Viewing Differences Between Tables ), or generate the merge script (Merging CSV and Database Differences).

 

Sorting, collapsing, and expanding tables

To simplify navigation through huge schemas which contain a lot of objects, you can collapse and expand individual tables when you are examining the differences. If you double-click a table in the left component, the same table is also collapsed or expanded in the right component, respectively (provided that a mapping exists between the two tables). To collapse all tables in both components, do one of the following:

 

On the Diff and Merge menu, click Collapse items.

Right-click the title bar of a component, and select Collapse tables from the context menu.

 

You can also sort tables in ascending or descending order, as follows:

 

Right-click the empty area and select Sort tables | Ascending or Sort Tables | Descending from the context menu. The options Ascending mapped first and Descending mapped first will give priority to tables that have mappings over those that don't.

 

Adding or removing tables from a comparison

To add more tables to the comparison, or remove existing one from the comparison, click the Browse diff_browse_button button in the upper-right corner of the database component and then select or clear the required check boxes.

© 2017-2023 Altova GmbH