My Oracle Support Banner

Wrong Error ORA-2291 With SQL*Loader And Import (IMP) When Trigger Exists On Target Table (Doc ID 1504013.1)

Last updated on MARCH 08, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.2 [Release 11.1 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

During loading (SQL*Loader) or importing (IMP) data into a detail table referencing a master table you receive the error:

ORA-2291: integrity constraint (TEST.B_TAB_FK) violated - parent key not found

related to good records which exist in master table.

The next examples (SQL*Loader and IMP) demonstrate this:

1. Using SQL*Loader (SQLLDR)

=> The detail rows:

Column 1 D
Column 2 1
Column 3 1
Column 4 Detail 1 line 1

Column 1 D
Column 2 1
Column 3 2
Column 4 Detail 1 line 2

Column 1 D
Column 2 1
Column 3 3
Column 4 Detail 1 line 3

are correct but are rejected with wrong error ORA-2291.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.