Solved

I got the errors duringimp

Posted on 2006-06-17
5
923 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 50 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSIS Loading Excel file to SQL database 10 65
Error 438 6 52
emailing registered email addresses in phpmyadmin 5 71
Database (Access Table) Security Access 8 60
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.
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
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…

752 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