SQL Data Compare 6.1  

Mapping Data Sources

See Also

When you create a comparison project and you have selected your data sources, SQL Data Compare maps tables and views with the same name and the same schema (owner) for you.

If SQL Data Compare is unable to map tables and views, for example if the table names are different in the two databases, those tables will not be compared. You can use the Ignore case of object names, Ignore spaces in object names, and Ignore underscores in object names project options to map tables and views with similar names.

However, if the table or view names are not similar or the schemas (owners) are not the same, you can compare the tables and views by mapping them in the Remap Objects tab on the Project Configuration dialog box.

The Remap Objects tab displays a list of tables and views in your databases; views are listed only if you select the project option Include views. Mapped tables and views are displayed side-by-side in the upper pane; Unmapped tables and views are displayed in the lower pane. Partial indicates that the tables or views have been mapped but not all of the columns are mapped.

You can change the order in which the tables and views are listed by clicking the appropriate column header. To sort by multiple columns, click a column header, then hold down SHIFT and click another column header.

The Remap Objects tab enables you to:

Note that you cannot map views if you are using a backup as a data source.

To reset all the mappings to the default ones, click Restore Default Mappings.

If you are editing an existing project and the structure of the database has changed since you last ran the project, a warning symbol  is shown to indicate that those changes affect your project configuration; see Mapping Errors for more information.

Mapping tables and views

To map tables and views:

  1. On the Remap Objects tab, select an Unmapped table or view that you want to map from the source database.
  2. Select the Unmapped table or view that you want to map from the target database.
  3. Click   Map.

    SQL Data Compare moves the tables or views to the upper pane.

Note that if the tables and views that you are mapping contain columns with incompatible data types, SQL Data Compare cannot compare those columns; the column mapping shows the incompatible data types as Uncomparable and a warning symbol  is shown in the Tables & Views tab.

To unmap tables and views:

  1. On the Remap Objects tab, select a Mapped table or view, or a Partial mapping.
  2. Click   Unmap.

    SQL Data Compare moves the tables or views to the lower pane.

Mapping columns

If you want to compare columns in a table or view and the column names are different, you can map the columns as required.

To map columns:

  1. On the Remap Objects tab, click the Status box of a Partial mapping.

    A dialog box is displayed. For example:

  2. Select an Unmapped column that you want to map from the source database.
  3. Select an Unmapped column that you want to map from the target database.
  4. Click   Map.

    SQL Data Compare moves the columns to the upper pane of the dialog box.

  5. Click Close.

Note that if a column is shown as Uncomparable, SQL Data Compare cannot compare the data that is stored in the column. For details about compatibility between data types, see Troubleshooting.

To unmap columns:

  1. On the Remap Objects tab, click the Status box of a Mapped table or view, or a Partial mapping.

    A dialog box is displayed for you to specify the column mappings, as shown above.

  2. Select a Mapped column.
  3. Click   Unmap.

    SQL Data Compare moves the columns to the lower pane of the dialog box.

  4. Click Close.

Mapping schemas (owners)

If you want to compare tables or views that have different schemas (owners), you can map the schemas (owners) as required.

  1. On the Remap Objects tab, click Map Owners.

    The Map Owners dialog box is displayed.

    The upper pane displays a list of schemas, database roles, and database users that are mapped; the lower pane displays a list of schemas, database roles, and database users that are not mapped.

  2. Do the following:
    • To map items, in the lower pane, select an item from the source database and an item from the target database, and click   Map.
    • To unmap items, in the upper pane, select the mapping, and click   Unmap.
  3. Click OK.

 

 

 


© Red Gate Software Ltd 2008. All Rights Reserved.