ORA-39083 ORA-02298 ORA-02374 ORA-1289 parent keys not found and value too large for column DESCRIPTION

Issue:

While importing from 11.2.0.4 to 12.2.0.1 DB:

ORA-39083: Object type REF_CONSTRAINT:"TEST"."TK_COD_TYPE" failed to create with error:
ORA-02298: cannot validate (TEST.TK_COD_TYPE) - parent keys not found

Failing sql is:
ALTER TABLE "TEST"."CODE" ADD CONSTRAINT "TK_COD_TYPE" FOREIGN KEY ("TYPE") REFERENCES "TEST"."CODEAREA" ("CODEAREA") ENABLE

ORA-39083: Object type REF_CONSTRAINT:"TEST"."TK_PDE_RPP_ID" failed to create with error:
ORA-02298: cannot validate (TEST.TK_PDE_RPP_ID) - parent keys not found

Failing sql is:
ALTER TABLE "TEST"."PDE_RPP_RPT_PARAM" ADD CONSTRAINT "TK_PDE_RPP_ID" FOREIGN KEY ("RPT_ID") REFERENCES "TEST"."RPT_REPORT" ("RPT_ID") ENABLE

ORA-39083: Object type REF_CONSTRAINT:"TEST"."TK_COD_TYPE" failed to create with error:
ORA-02298: cannot validate (TEST.TK_COD_TYPE) - parent keys not found

Failing sql is:
ALTER TABLE "TEST"."CODE" ADD CONSTRAINT "TK_COD_TYPE" FOREIGN KEY ("TYPE") REFERENCES "TEST"."CODEAREA" ("CODEAREA") ENABLE

ORA-39083: Object type REF_CONSTRAINT:"TEST"."TK_PDE_RPP_ID" failed to create with error:
ORA-02298: cannot validate (TEST.TK_PDE_RPP_ID) - parent keys not found

Failing sql is:
ALTER TABLE "TEST"."PDE_RPP_RPT_PARAM" ADD CONSTRAINT "TK_PDE_RPP_ID" FOREIGN KEY ("RPT_ID") REFERENCES "TEST"."RPT_REPORT" ("RPT_ID") ENABLE


Also received this:

ORA-02374: conversion error loading table "TEST"."CODEREA"
ORA-12899: value too large for column DESCRIPTION (actual: 41, maximum: 40)

Cause:

This error comes when you are trying to import data from one database A to database B and character set of database A is different then character set of database B.

to check the characterset of database use below query:

select * from database_properties where PROPERTY_NAME in ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET');


Solution:

If character set is different then you have only one option which is to remove target 12.2.0.1 database if other data is not on that (Be cautious and remove only after considering that no data is being loss) and then reinitialize the DBCA and create new database instance with advance option and make sure you choose the same character set as of source database.


Thanks & Regards
Nikhil Kumar. 


Comments

Popular posts from this blog

How to set the root password after creating instance on oracle cloud

TNS-12541 TNS-12560 TNS-00511 TNS:protocol adapter error No listener

Queryable inventory could not determine the current opatch status.