import and constraints Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: import and constraints

  1. #1
    Join Date
    Jan 2001

    import and constraints


    After a long time today i did a import and after running the import i see that the log file had a message saying unable to enable constraint because of duplicate keys.

    I see that the database has duplicate rows in the table.I dont have aceses to the source database

    My question is if the source database has duplicate rows and the constraints are disabled does import tries to enable the constraint ?

    If the source database had the constraint has initially deffered an no validate and then reenabled the constraints does import fail while enabling the constraints ?


  2. #2
    Join Date
    Mar 2007
    Ft. Lauderdale, FL
    I've seen that.

    Here is what I would do.

    1- Import with CONSTRAINTS=NO option so imp wouldn't try to create constraints.
    2- Create constraints with NOVALIDATE, ENABLE options.

    If you do not have access to source database you can still get basic DDL for constraints running import with SHOW=YES, ROWS=NO options.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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