Q

Unique constraint violations, "parent key not found" errors

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?

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.

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.

This was last published in August 2007

Dig Deeper on Oracle database backup and recovery

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close