DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Deferred Index?

  1. #1
    Join Date
    May 2002
    Posts
    15
    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.

  2. #2
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    342
    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

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    hi just want to add a small remark, you use novalidate or validate when you enable, disable constraints

  4. #4
    Join Date
    Aug 2002
    Location
    Bangalore, India
    Posts
    405
    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

  5. #5
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    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
  •  


Click Here to Expand Forum to Full Width