Troubleshooting
Problem
Error message running a stream exporting data to Oracle: 23000[1][520][ODBC Oracle Wire Protocol Driver][Oracle]ORA-00001: unique constraint (xxx) violated (where xxx stands for the constraint name)
Cause
You tried to execute an INSERT or UPDATE statement that has created a duplicate value in a field restricted by a unique index.
Resolving The Problem
The option(s) to resolve this Oracle error are:
1) Drop the unique constraint.
2) Change the constraint to allow duplicate values.
3) Modify your SQL so that a duplicate value is not created.
If you are not sure which unique constraint was violated, you can run the following SQL:
SELECT DISTINCT table_name
FROM all_indexes
WHERE index_name = 'xxx'; (where xxx stands for the constraint name from the error message)
Ref below url's for more info:
https://docs.oracle.com/cd/E11882_01/server.112/e17766/e0.htm
http://www.techonthenet.com/oracle/errors/ora00001.php
So basically this issue happens if you attempt to insert an already existing value into a column defined as requiring unique data. You may have to check with your Oracle DBA and see if that constraint has been set and if so if it can be removed, as mentioned above, so the export can be completed. Either
way the issue is with the Oracle Database you are trying to write to and will have to be taken care of on the Oracle side
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21976302