How to solve the foreign key constraints in DB2 data migration

Source: Internet
Author: User

When migrating data, you must have encountered an error when importing and exporting foreign key constraints. Foreign key constraints are used to ensure the integrity of the database. The integrity of the English word is integrity, so the command that temporarily closes the foreign key constraint allows you to import smoothly is: set integrity for table_name off set integrity for table_name foreign key immediate unchecked. In addition to this method, you can also use the alter statement to modify the constraint so that it is not executed. This can also be achieved: alter table <table-name> alter foreign key <constraint-name> not enforced: alter table <table-name> alter foreign key <constraint-name> ENFORCED: From Yu guanghong's note column

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.