Solved

I got the errors duringimp

Posted on 2006-06-17
5
878 Views
Last Modified: 2008-02-07
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.
0
Comment
Question by:salasadi
5 Comments
 
LVL 25

Expert Comment

by:jrb1
Comment Utility
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
 
LVL 16

Expert Comment

by:MohanKNair
Comment Utility
The problem is that all data in parent table is anot available. The table may be referencing a table in another schema.
0
 
LVL 6

Accepted Solution

by:
JJSmith earned 50 total points
Comment Utility

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
 

Author Comment

by:salasadi
Comment Utility
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
 

Author Comment

by:salasadi
Comment Utility
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now