Ask the Expert

Importing tables 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?

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

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: