Is there any way to get the complete row or selected columns of source row/table which is causing
"ORA-00001 unique constraint violated" error.
Here is a small example.
create table DW_DATA (
file_id number,
process_date date,
record_info varchar2(50),
constraint uk_pd_ri unique (process_date,
record_info)
);
After create, Inserting first record,
insert into DW_DATA
values (100,
'10-Jul-2018',
'Information about row');
commit;
Now, I am inserting a new row.
insert into DW_DATA
values (200,
'10-Jul-2018',
'Information about row');
It will throw an error "ORA-00001 unique constraint violated".
So, my question is, is it possible to get the file_id of source row i.e. 100 using DBMS_ERRLOG concept. Or is there any other approach available to get the info about source row.
insert into ... log errors into ...but that would not cause the insert to fail! - a_horse_with_no_name