I got the errors duringimp

all record imported successfully, but I got this error, how to fix this without re-imp the data?
About to enable constraints...
IMP-00017: following statement failed with ORACLE error 2298:
 "ALTER TABLE "SIGNATURES" ENABLE CONSTRAINT "SIGN_PGIDFK""
IMP-00003: ORACLE error 2298 encountered
ORA-02298: cannot validate (STCLOUD.SIGN_PGIDFK) - parent keys not found
Import terminated successfully with warnings.
salasadiAsked:
Who is Participating?
 
JJSmithConnect With a Mentor Commented:

It may be that the data was not there at the time!

Have you since tried to manually:

ALTER TABLE "SIGNATURES" ENABLE CONSTRAINT "SIGN_PGIDFK";

what is the outcome?

If you are sure that the parent table is there then try something like:

select distinct (FOREIGN KEY) from SIGNATURES
MINUS
select distinct (PRIMARY KEY) from The_Parent_Table;

If anything is returned then you have orphaned data and the 'integrity' of you Database needs to be repaired. If the query falls over because it can't access both tables - then that could be your problem!!

People here will need more feedback from you to resolve this issue ( it is not difficult ).

Cheers
JJ


0
 
jrb1Commented:
Hi salasadi,

Were you doing something special on the import?  If all the parent and child records imported correctly, you should be able to enable the constraints.  Do you know what the parent keys for SIGN_PGIDFK are?  You could do a SELECT on the data to see what is missing.

Regards,
John
0
 
MohanKNairCommented:
The problem is that all data in parent table is anot available. The table may be referencing a table in another schema.
0
 
salasadiAuthor Commented:
thanks for your response..
the exp was successful with no problem.   but the imp retrun the problem:

the query you asked me to run is:
retruns

SQL> select distinct (PAGEID) from SIGNATURES
  2  MINUS
  3  select distinct (PAGEID) from DOCUMENTPAGES;

    PAGEID
----------
   5692153

SQL> select count(*) from signatures;

  COUNT(*)
----------
    339442

SQL> select count(*) from documentpages;

  COUNT(*)
----------
   5368799

I still can not enable the constriants. the documentpages(parent table) hold reltaed record from diffrent tables, however the record in question is 339442.


0
 
salasadiAuthor Commented:
JJ,
thanks for your comment, you shed the light on the problem.  appearntly the exp done with consisting=N so there was a record insert in signature at 10 PM where documenotpages was already exported at 6 PM!  after I find the record by ran your query:
select distinct (pageID) from signatures
  2  MINUS
  3  select distinct (pageID) from DOCUMENTPAGES;

pageid
---------
5692153

select count(*) from DOCUMENTPAGES; where documentid=5692153;

count
--------
0

select count(*) from sigantures; where documentid=5692153;

count
--------
1


then I want to original table and did:
exp user/Password tables=(documentpages,signatures) file=c:\sign.dmp query=\"where pageid=5692153\"

then I diable the constriants in both table and I did imp and I got the missing record:

imp user/Password tables=(documentpages,signatures) file=c:\sign.dmp

select distinct (pageID) from signatures
  2  MINUS
  3  select distinct (pageID) from DOCUMENTPAGES;

pageid
---------
0

Thanks again








0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.