You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

You can specify a custom key when the table or view has no built-in key or when the existing key is not suitable for data compare.

The following rules apply to custom keys:

  • A custom key can be defined under the xml element <LeftObject> or <RightObject> of the <Pair> element
  • A custom key must have a name and one or more columns
  • The columns that participate in the custom key should exist in the parent table or view
  • The key must be defined for each object in the pair of entities.
  • The columns that participate in the custom key must be identical for both objects in the specified pair.

The following xml fragment defines a custom key for the pair of table dbo.Employees:

<TablePairs>
     <Pair>
          <LeftObject Name="dbo.Employees">
               <Key Name="Custom_Key">
                    <Column>EmployeeID</Column>
               </Key>
          </LeftObject>
          <RightObject Name="dbo.Employees">
               <Key Name="Custom_Key">
                    <Column>EmployeeID</Column>
               </Key>
          </RightObject>
     </Pair>
</TablePairs>

 

Total compare from data to schema with IDERA SQL Comparison Toolset. Learn more > >
  • No labels