Home > Ask the Oracle Experts > Database Backup and Recovery Questions & Answers > Unique constraint violations, "parent key not found" errors
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Unique constraint violations, "parent key not found" errors

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 06 August 2007
Hi Brian, I exported a schema from a production database and tried to import to the same schema in the test database. The import completed with lots of unique constraint violation and "parent key not found" error messages. How to fix it? Do I need to disable all the constraints before importing the data? By the way, no triggers got imported. Thank you.

>
EXPERT RESPONSE

If the tables already exist in your test database, then you may have to disable the constraints before importing the data. Normally, I drop the objects before importing them anew in a test environment. The quickest way to accomplish that is to drop the schema owner and re-create it.

You should not get constraint violations if the tables do not exist because the constraints will not be created until after the data has been imported.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Database Backup and Recovery
How to recover a control file
The USING BACKUP CONTROLFILE clause in Oracle commands
Backup and recoveries of Oracle RAC 10gR2
How to use the OPatch Utility in Oracle
Backup and recovery of Oracle 10g with forgotten admin password
How to get history of modified data from Oracle databases
Export dump with files larger than 2 GB
What is Unix shell scripting?
Performing a backup with table locks
How to move data faster with a database link

Oracle database export, import and migration
Oracle and SQL Server: BFF?
Oracle as data integrator
Importing from Oracle 8i to Oracle 10g
Export schemas of users of database
Exp/imp for complex cross-platform migration and upgrade
How to export data by date in Oracle
Large data migration from XML database to Oracle 10g
IMP-00017 error message with Oracle import
Can't open database after failed backup export
LOB tables missing with exp/imp move of schema

Oracle error messages
ORA-12560 error with Oracle 10g Instant Client
Unable to view Oracle tables in NetBeans
IMP-00017 error message with Oracle import
Can't open database after failed backup export
Query on dblink returning ORA-12545 error
RMAN not working at command prompt
Insufficient privileges error when creating stored procedure
IMP-00010 error with import from 10g to 9i
ORA-12801 error while loading seed data
Can I import into Oracle 9i with imp.exe version 10g?

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsTipsAsk the ExpertsWebcastsWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts