Mar 18, 2015

ORA-31685 error during import using IMPDP

Issue:

While you are importing a schema/ remaping a schema, then you may face this issue if any foreign keys are created by the import schema. See the error below:


ORA-31685: Object type REF_CONSTRAINT:"CRM"."PARAMMAPPINGID_FK" failed due to insufficient privileges. Failing sql is:
ALTER TABLE "CRM"."OPIASTATUS" ADD CONSTRAINT "PARAMMAPPINGID_FK" FOREIGN KEY ("PARAMMAPPINGID") REFERENCES "HR"."PARAMETERMAPPING" ("PARAMMAPPINGID") ENABLE

Solution:

SQL> grant REFERENCES on "HR"."PARAMETERMAPPING" to CRM;

Give grant like above for all failed FK constraints, and take the failed statements from import log and re-create the script and execute it.


No comments:

Post a Comment

Translate >>