Saturday, February 14, 2015

Errors while importing data from Excel to SQL Server and their solutions - 1

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: "Unspecified error".
 (SQL Server Import and Export Wizard)

Error 0xc020901c: Data Flow Task 1: There was an error with Destination - Employee.Inputs[Destination Input].Columns[Emp_id] on Destination - Employee.Inputs[Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.". (SQL Server Import and Export Wizard)

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "Destination - Employee.Inputs[Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "Destination - Employee.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
 (SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - Employee" (37) failed with error code 0xC0209029 while processing input "Destination Input" (50). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.
 (SQL Server Import and Export Wizard)

Solution :
This Error states that referential integrity is violated while importing data into the Table. Here we need to verify if there is any primary key with not null constraint present in the destination table. Also if you are migrating data from a table in sql server check if the column referring primary key contains null values. If yes, delete the null values and try importing the data again. I did it and it worked for me!.

When I checked the source table I found this:


No comments:

Post a Comment