Q

ORA-2264 error when importing data

We export data in full mode and in consistent mode. But when we import this data we have too many errors, such as "ORA-2264: name already used by an existing constraint."

We have Oracle 8 on a Windows NT platform. We export data in full mode and in consistent mode:
consistent=y
full=y
buffer=64000
But when we import this data we have too many errors, such as "ORA-2264: name already used by an existing constraint." We have found out that when we make a new user in a new database then some tables exist; in this case when we import data it crashes with the existing constraint. Please help us to find the solution.

You did not list your import parameters so I am unsure as to your exact problem.

When you import objects into a schema, those objects to be imported must not have the same name as other objects in the schema. In your case, you are experiencing the ORA-2264 error which means other constraints in the schema have this same name. As a matter of good practice, I always put my table name and the constraint type and sometimes the affected columns in my constraint name. This way, I will not have conflicts with two constraints trying to use the same name. For example, a PK constraint on the EMP table will be named EMP_PK. A unique constraint on the SSN column of the EMP table will be named EMP_SSN_UK. A Foreign Key constraint from EMP to DEPT will be named EMP_DEPT_FK. A NOT NULL constraint on the NAME column of the EMP table will be named EMP_NAME_NN. Since I cannot have two tables named EMP, similar constraints will not have the same name because I have followed a convention to ensure this does not happen.

This was first published in May 2006

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:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close