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

(Doc ID 1504013.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Server - Enterprise Edition - Version to [Release 11.1 to 11.2]
Information in this document applies to any platform.


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.


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms