In the normal import order, referential constraints are imported only after all tables are imported. This sequence prevents errors that could occur if a referential integrity constraint exists for data that has not yet been imported.
These errors can still occur when data is loaded into existing tables. For example, if table emp
has a referential integrity constraint on the mgr
column that verifies that the manager number exists in emp,
then a legitimate employee row might fail the referential integrity constraint if the manager's row has not yet been imported.
When such an error occurs, Import generates an error message, bypasses the failed row, and continues importing other rows in the table. You can disable constraints manually to avoid this.
Referential constraints between tables can also cause problems. For example, if the emp
table appears before the dept
table in the export dump file, but a referential check exists from the emp
table into the dept
table, then some of the rows from the emp
table may not be imported due to a referential constraint violation.
To prevent errors like these, you should disable referential integrity constraints when importing data into existing tables.