My Oracle Support Banner

DataPump User Level Imports Missing Foreign Key Constraints After IMPDP Errors ORA-31685 (Doc ID 1171365.1)

Last updated on AUGUST 01, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 12.1.0.2 [Release 10.2 to 12.1]
Oracle Database Cloud Schema 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
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

After a user level import, foreign key constraints are missing. The import log may show error messages like following:

ORA-31685: Object type REF_CONSTRAINT:"<SCHEMA_NAME>"."<REF_CONSTRAINT_NAME>" failed due to insufficient privileges. Failing sql is:
ALTER TABLE "<SCHEMA_NAME1>"."<TABLE_NAME1>" ADD CONSTRAINT "<REF_CONSTRAINT_NAME>" FOREIGN KEY ("<COL_NAME>") REFERENCES "<SCHEMA_NAME2>"."<TABLE_NAME2>" ("<PK_COLUMN>") ENABLE

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


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