-
Hi All
I imported sucesfully one schema today. (log file said everything is OK)
In this schema I have table 1 that have foreign key references to table 2.
This constraint is enabled and is not deferrred or deferrable.
Problem that I have is next:
When I disabled and then try to enabled this constraint I got message that primary key does'not exist.
After investigation I found that really in table 1 I do have some records that do not have appropriate record (parent = primary key) in the table 2.
How is this possible?
Again: After I imported my schema constraint was enabled.
-
If you create the constraint with option 'NOVALIDATE', then there will be no checking to see wether all the records match the constraint.
Only when changing/adding rows the constraint will be checked/enforced.
This could be an explanation.
Regards
Gert
-
hi just want to add a small remark, you use novalidate or validate when you enable, disable constraints
-
Originally posted by pando
hi just want to add a small remark, you use novalidate or validate when you enable, disable constraints
I think we can use something like..
ALTER TABLE TNAME123 ADD CONSTRAINT PK_TNAME123 PRIMARY KEY(COL1) ENABLE NOVALIDATE;
Doesn't this add a constraint and make it novalidate??
-nagarjuna
-
could u post ur imp par file .
are u using single imp command for all schemas ? with constraints=Y .
because in any case if constraints are present and enabled at the time of export . then it doesn't matter u validate or not at the time of import . it should enable the constraint unless data is manually entered .
siva prakash
DBA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|