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?

This Content Component encountered an error
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 first published in August 2007

Dig deeper on Oracle database backup and recovery

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close