Set-up Conversion Rules

In Conversion Options dialog you can view and modify Data type Mapping (correlation between a pair of data types of different databases) used as Conversion rules.

Working with different databases, Cross-Database Studio allows to Migrate structure and data from one database to other and to Compare and Synchronize data and structure between databases.

Since metadata structures' definitions differ from database to database, Cross-Database Studio provides data type Conversion rules for Migration, Comparison and Synchronization.

  1. Migration process always uses the Conversion options definitions.
  2. Structure Comparison uses the Conversion options rules if the Use Conversion settings while comparing option is enabled in the Compare options settings dialog.
  3. Data Comparison is not affected by the Conversion Options definitions.
  4. Synchronization uses the same Conversion Options used by the comparison that preceded it.
Cross-Database Studio supplies a set of default Conversion Options . Existing rules may be modified and new rules may be added.

How to use:

  1. From main menu, select Tools?Convert Options…. Conversion options dialog will open. There is an option to select pair of database vendors.
  2. From the Source Database combo box select the database type you are going to use as a source for Migration or Synchronization flow.
  3. From the Target Database combo box select the database type you are going to Migrate or Synchronize your schema or data into.
    Data Types table with source and target data types will be shown.
    In the Source Data type column you can see the full list of native Data types, available in the database vendor, selected from the Source Database list.
    In the Destination Data type column you can see the native target database data types, suggested by predefined Cross-Database Studio's definition to be used during Migration and Synchronization.
    Additional fields are: Length, Precision and Scale .
    Available values of Length, Precision" and Scale are: Additional options, available in Conversion Options dialog:
Note: Migration, Comparison and Synchronization are affected, in addition to Conversion rules, by "SQL Vendor Specifics".
These specifications define NULL, Default values and object names case-sensitivity policy.
For more info see topic SQL Vendor Specifics.

Advanced:

Why sometimes conversion algorithm may conclude that defined rule can't be used?

Example:

Source and Target databases support VARCHAR data type. Conversion rule suggests this data type as target for Varchar selected in source. The problem may occur when source database supports Varchar with maximal size 4000, while target database supports only size 256. If all Varchar fields in source database are defined with size less or equal to 256, it will not be problem while conversion. If there are fields with Varchar longer then 256 in the source database, conversion algorithm will not be able to create a relevant field in the target database, using Varchar data type. To solve this problem, conversion algorithm will use "Alternate Data type", defined in conversion rule. For our example, the Alternate Data type may be Binary.

Note: In our example we used Varchar data type. Same scenario may happen with other data types in different types of databases pairs.

See also: