Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005

Question: How do you solve for this error? 

Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "The statement has been terminated.".
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_SomeValue". The conflict occurred in database "DatabaseName", table "dbo.tableName", column 'id'.".


Please Login to see the rest of the answer

Answer: Import one table at a time, it showing you that one table has a foreign key that references another table, data import will not go through until that
table is imported first. Best way to resolve this issue is to identify the table that has a referenced Foreign key then importing that table first, followed by the table
that has the Foreign Key (referencing the other table).

 


Write an Article
#Server #SQL #Import Data SQL published
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy