We have a huge table with nested tables and such. We are using Bulk Collect & FORALL to insert.
When loading data, I am getting this error:
ORA-00001: unique constraint (.) violated
There is no constraint name……so, how can I find out 1) What or where is causing the error, and, 2) Which record it is?
I know you can keep exceptions with FORALL, but we are doing this in lots of 500, so it is hard to find out the actual record, and what constraint / nested table it is, etc.
I'm looking for any help anyone can give.
Many thanks!
Best Answer
A possible bug for not displaying the constraint name with bulk DML and
SAVE EXCEPTIONS
clause:Bug 7210333 : CONSTRAINT NAME IN SQLERRM IS NOT OUTPUT WHEN SAVE EXCEPTIONS IS USED
To catch the records causing the error, you could use DML error logging as well:
Insert data:
Actual data:
Rows violating the constraint with row data and constraint name: