DTS checks the foreign key integrity constraint during the precheck to ensure successful data migration.

This item checks whether all the parent and child tables with foreign key dependencies among the objects to be migrated have been migrated, to avoid violating the foreign key integrity constraint. If this item fails to pass the precheck, the parent tables that the child tables to be migrated depend on are not selected as objects to be migrated. You can choose one of the following methods to fix this issue based on your business requirements.

Select parent tables as objects to be migrated

Follow these steps to select parent tables of the tables that fail the precheck as objects to be migrated.

  1. Find the migration task and click Edit Task.Modify task configurations
  2. Click Set Whitelist and Next in the lower-right corner of the page.
  3. Select parent tables of the tables that fail to pass the precheck and click > to move them to the Selected section.Add to the objects to be migrated
  4. Click Precheck.

Remove the child tables from the objects to be migrated

Follow these steps to remove tables that fail the precheck from the objects to be migrated.

  1. Find the migration task and click Edit Task.Modify task configurations
  2. Click Set Whitelist and Next in the lower-right corner of the page.
  3. Select tables that fail to pass the precheck and click < to remove them from the Selected section.Remove tables from the objects to be migrated
  4. Click Precheck.

Delete foreign key dependencies

Follow these steps to delete foreign key dependencies from the source tables that fail to pass the precheck.

  1. Log on to the source database.
  2. Run a command to delete foreign key dependencies from the tables that fail the precheck.
    Note You can also log on to the DMS console to perform this operation. For more information, see Manage foreign keys.
  3. Perform another precheck.