Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I got the errors duringimp

Posted on 2006-06-17
5
Medium Priority
?
952 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

722 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