Unlock the Power of AI

1 million free tokens

88% Price Reduction

Activate Now

Integrity constraint

Updated at: 2024-09-06 08:50

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.

  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.

  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.

  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.

  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.

    ALTER TABLE <tablename> DROP FOREIGN KEY <foreignkeyname>;
    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.

  • On this page (1, T)
  • Select parent tables as objects to be migrated
  • Remove the child tables from the objects to be migrated
  • Delete foreign key dependencies
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare