Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I got the errors duringimp

Posted on 2006-06-17
5
Medium Priority
?
976 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
ID: 16928422
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
ID: 16929214
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 200 total points
ID: 16929618

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
ID: 16929759
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
ID: 16929947
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

963 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