Errors: Violation of UNIQUE KEY constraint ‘UN_FILENAME’. Cannot insert duplicate key in object

5 pts.
Tags:
Data migration
Oracle 9i
SQL Server 2005
when i am migrating data from oracle9i to SQL2005 i am getting the error Errors: Violation of UNIQUE KEY constraint 'UN_FILENAME'. Cannot insert duplicate key in object how should i solve the problem

Answer Wiki

Thanks. We'll let you know when a new response is added.

Sounds like you have created a unique constraint or unique index on the table that didn’t exist on the Oracle database, or you are trying to insert the records a second time.

It could also be that the Oracle table was case sensitive, while the SQL Server defaults to case insensitive. If this is the case and you have the value “Test” and try to insert the value “TEST” you’ll get the duplicate key error. This can be corrected by changing the collation of the column, table or database to a case sensitive collation.

If there is no matching constraint on the Oracle database, simply remove the constraint.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

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

Thanks! We'll email you when relevant content is added and updated.

Following