gnanny
Mar 30, 2023Copper Contributor
Bulk Insert causing duplicates in target table
We use ETL tool(C# based) which uses Bulkcopy method to do bulk insert to target table.
Recently we are facing 2 Issues in our daily loads
1. Target table with no primary key
- the load returns success but it inserts 5x times of the same record. It loads same records 5 times.
2. Target table with Primary Key
- The load returns failure with primary key constraint but it inserts the rows into target table.
DBA Team is unable to find anything in there logs ,So I am confused why this error occurs.
This occurs daily in 10% of the jobs and once you rerun after 2-3 hrs the same job finishes successfully without above mentioned issues.
Please suggest how can I debug this issue.