I'm getting an error while trying to copy 4 tables from a MySQL source to SQL Server 2008.

Here's a photo of the Data Flow, as you can see, 2 of them are OK (the smaller ones)

enter image description here

With an OnError event handler I'm able to see the errors. Here they are.

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Errorcode: 0x80040E21. An OLE DB record is available. Source: "MicrosoftSQL Server Native Client 10.0" Hresult: 0x80040E21 Description:"Multiple-step OLE DB operation generated errors. Check each OLE DBstatus value, if available. No work was done.".

There was an error with input column "FechaHoraCorteAgente" (884) oninput "OLE DB Destination Input" (510). The column status returnedwas: "Conversion failed because the data value overflowed thespecified type.".

SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLEDB Destination Input" (510)" failed because error code 0xC020907Aoccurred, and the error row disposition on "input "OLE DB DestinationInput" (510)" specifies failure on error. An error occurred on thespecified object of the specified component. There may be errormessages posted before this with more information about the failure.

SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method oncomponent "OLE DB Destination 2" (497) failed with error code0xC0209029 while processing input "OLE DB Destination Input" (510).The identified component returned an error from the ProcessInputmethod. The error is specific to the component, but the error isfatal and will cause the Data Flow task to stop running. There maybe error messages posted before this with more information about thefailure.

The component "ado net conptacto" (1) was unable to process the data.Exception from HRESULT: 0xC0047020

The component "ADO NET logllamados" (482) was unable to process thedata. Exception from HRESULT: 0xC0047020

SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method oncomponent "ado net conptacto" (1) returned error code 0xC02090F5.The component returned a failure code when the pipeline engine calledPrimeOutput(). The meaning of the failure code is defined by thecomponent, but the error is fatal and the pipeline stopped executing.There may be error messages posted before this with more informationabout the failure.

SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method oncomponent "ADO NET logllamados" (482) returned error code 0xC02090F5.The component returned a failure code when the pipeline engine calledPrimeOutput(). The meaning of the failure code is defined by thecomponent, but the error is fatal and the pipeline stopped executing.There may be error messages posted before this with more informationabout the failure.

Any idea of what's going on in here?

3

Best Answer


"Conversion failed because the data value overflowed the specified type." seems pretty obvious, you are trying to insert something where it doesn't fit. I suggest you compare all your source columns with destination columns and make sure that:

  • lengths are enough
  • data types are compatible

you can post your tables' structures if you would like a hand on that

Source column has 0000-00-00 in a datetime field. So there was the error.

Created a Derived Column with the expression:

(DT_DBTIMESTAMP)(DAY([FechaHoraCorteAgente]) == 0 ? NULL(DT_DBTIMESTAMP) : [FechaHoraCorteAgente])

It's a failure at source, If the package fails while inserting at the destination, that's easily solvable. I have come across many situations where the source data is larger than what SSIS source is expecting to see.

I think when you create the source, SSIS automatically samples the input data to see the maximum length. But what if that maximum length were to be exceeded? That's where I see most of the problems relating to overflow.

Also, many a times when dealing with poorly handled source data, you would see a character data in a date time field. Such a scenario would also spoil the package.