DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: import error-ORA-00001: unique constraint (GLISADM.C_CUS_SK_01) violated

  1. #11
    Join Date
    Jul 2005
    Posts
    87
    Yeah did as you said PAVB here is the error iam get.

    SQL> delete from GLISADM.T_CUSTOMER where rowid in (
    2 SELECT rowid FROM GLISADM.T_CUSTOMER a
    3 WHERE a.rowid > (SELECT MIN(b.rowid)
    4 FROM GLISADM.T_CUSTOMER b
    WHERE b.CUS_COMPANY = a.CUS_COMPANY
    and b.CUS_CONTACT_NAME = a.CUS_CONTACT_NAME
    5 6 7 and b.CUS_COUNTRY_CODE = b.CUS_COUNTRY_CODE));
    delete from GLISADM.T_CUSTOMER where rowid in (
    *
    ERROR at line 1:
    ORA-23474: definition of "GLISADM"."T_CUSTOMER" has changed since generation of
    replication support
    ORA-26500: error on caching "GLISADM"."T_CUSTOMER"

    any suggestions

  2. #12
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    I'm starting to feel you are not telling us all what's going around.

    Is somehow replication involved in your scenario?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #13
    Join Date
    Jul 2005
    Posts
    87
    I am supposed to do migration for this database from 9i to 10g and the
    application team did't specify anything about replication or anything
    just gave access to source and expected me to do it,so anyway

    1)i exported full but started getting errors ORA-12899 while importing for table T_CUSTOMER so imported everything then i truncated the table T_CUSTOMER and increased the width of the column to 150(orignal 80)
    but it was giving error ORA-00001 while loading this table so as suggested
    pre-created table with no PK and loaded data then i thought of deleting
    any duplicate data but it gave error ORA-23474 then i dropped the idea of deleting the duplicate rows and started enabling the constraints and got the
    following errors

    IMP-00017: following statement failed with ORACLE error 23313:
    "BEGIN SYS.DBMS_REPCAT.REPCAT_IMPORT_REPSCHEMA; END;"
    IMP-00003: ORACLE error 23313 encountered
    ORA-23313: object group "PUBLIC"."EXTERNAL" is not mastered at GLISD
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_REPCAT", line 1065
    ORA-06512: at line 1
    . importing GLISADM's objects into GLISADM
    . importing SYSTEM's objects into SYSTEM
    . importing GLISADM's objects into GLISADM
    . importing REPDBA's objects into REPDBA
    . importing SYS's objects into SYS
    . importing SYSTEM's objects into SYSTEM
    About to enable constraints...
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "REPCAT$_GENERATED" ENABLE CONSTRAINT "REPCAT$_REPGEN_PRNT""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (SYSTEM.REPCAT$_REPGEN_PRNT) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "REPCAT$_GENERATED" ENABLE CONSTRAINT "REPCAT$_REPGEN_PRNT2""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (SYSTEM.REPCAT$_REPGEN_PRNT2) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "REPCAT$_REPCOLUMN" ENABLE CONSTRAINT "REPCAT$_REPCOLUMN_FK""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (SYSTEM.REPCAT$_REPCOLUMN_FK) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "REPCAT$_REPPROP" ENABLE CONSTRAINT "REPCAT$_REPPROP_PRNT""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (SYSTEM.REPCAT$_REPPROP_PRNT) - parent keys not found
    . importing GLISADM's objects into GLISADM
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_APL" ENABLE CONSTRAINT "C_APL_FK_01""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_APL_FK_01) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_APL" ENABLE CONSTRAINT "C_APL_FK_02""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_APL_FK_02) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_APL" ENABLE CONSTRAINT "C_APL_FK_02""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_APL_FK_02) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_APL" ENABLE CONSTRAINT "C_APL_FK_CB""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_APL_FK_CB) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_01""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_01) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_02""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_02) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_04""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_04) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_05""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_05) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_06""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_06) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_07""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_07) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_CB""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_CB) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CALL" ENABLE CONSTRAINT "C_CAL_FK_MB""
    IMP-00003: ORACLE error 2298 encountered
    ORA-02298: cannot validate (GLISADM.C_CAL_FK_MB) - parent keys not found
    IMP-00017: following statement failed with ORACLE error 2298:
    "ALTER TABLE "T_CDPART" ENABLE CONSTRAINT "C_CDP_FK_CB""

    hope i made things clearer this time .

    Thanks

  4. #14
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Have you read the error message? "parent keys not found" ... what it tells you?
    Last edited by PAVB; 06-24-2007 at 10:30 AM.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #15
    Join Date
    Jul 2005
    Posts
    87
    That there are some records in child table that does not exists in the parent,
    so either got to add those records to parent table or drop orphan records
    from child right?what is the query for obtaining what parent table
    is the foreign key referencing to and to obtain the orphan records ,i'll
    apperciate that.

    Thanks PAVB for your help

    Thanks

  6. #16
    Join Date
    Jul 2005
    Posts
    87
    What would be impact of this command on the consistency of data,
    alter table xyz modify constraint abc enable novalidate

  7. #17
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by areeb
    alter table xyz modify constraint abc enable novalidate
    It will create the constraint letting whatever data -good or bad in terms or referential integrity- you have there and, just start validating referencial integrity from that point in time into the future.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  8. #18
    Join Date
    Jul 2005
    Posts
    87
    Thanks PAVB for execellent explaination.I really apperciate your input on this, really grateful of you.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width