Q

Importing tables with integrity constraints

An Oracle user asks why they are receiving errors when importing a table with integrity constraints.

I am using Oracle 8i in a Windows 2000 Server and importing a dump file to a new schema created in another machine.

First I imported only the database structure without data, and then I imported only the data to the tables by the ignore=y option. As the tables have some integrity constraints, it gives lots of errors while importing.

Can I disable the constraints and triggers while importing? Is there any way to import data to an existing table if constraints are enabled? Which are the commands to disable the constraints? Will any data be duplicated if constraints are disabled?
I never would have imported the database structure first, and then the data. The primary reason is the integrity constraints you mentioned. If you import the structure and the data at the same time, you won't have this problem. Oracle won't enable the constraints until the tables in the schema are populated with data. Since you have the tables created, you will have to manually disable the constraints to perform the export. There is no command in the import utility to do this for you.

This was first published in February 2008

Dig deeper on Oracle database export, import and migration

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:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close