After Installation of .NET Framework 3.5 SP1 (or .Net framework 2.0 SP2) , SSIS packages using ODBC 3rd party drivers may fail
The Issue:
In the last few months, we have seen quite a few cases where after installing .net framework 3.5 SP1 ( KB https://support.microsoft.com/kb/951847), SSIS packages using certain ODBC 3rd party drivers and importing character data may fail with the error below -
Error Message:
[DataReader Source [<number>]] Error: SSIS Error Code
DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "DataReader Source" (<number>)" failed because error code 0x80131937 occurred, and the error row disposition on
"output column "ColumnName" (<number)" 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.
The error messages may vary depending on if you are using DataReader Source in Visual Studio 2005 or ADO .Net Source in Visual Studio 2008 –
[ADO NET Source [<number>]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "ADO NET Source" (<number>)" failed because error code 0x80131937 occurred, and the error row disposition on "output column "ColumnName" (<number>)" 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.
Error 0xc0209029: Data Flow Task: The "component "<ComponentName>" (<number>)" failed because error code 0x80131937 occurred...
[ADO NET Source [<number>] Error: The component "ADO NET Source" (<number>) was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "ADO NET Source" (<number>) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
NOTE: Not all ODBC drivers are affected by this problem. This problem affects primarily SSIS packages which import character data using certain 3rd party ODBC drivers, through the use of ADO.Net connection manager and System.Data.ODBC managed provider.
In Visual Studio 2005: SSIS DataReader Source --> ADO.Net connection manager --> .Net Providers \ ODBC Data Provider (System.Data.Odbc) --> Vendor ODBC driver --> Character data
In Visual Studio 2008: ADO .Net Source --> ADO.Net connection manager --> .Net Providers \ ODBC Data Provider (System.Data.Odbc) --> Vendor ODBC driver --> Character data
Cause:
The problem started with .Net Framework 2.0 SP2 after a change was made in the way OdbcDataReader checks for Nulls in Sequential Access mode, calling SQLGetData with a BufferLength argument of 0 for variable width data types. Certain ODBC drivers are not compatible with this pattern. For more information on this function and its arguments, see: SQLGetData Function https://msdn.microsoft.com/en-us/library/ms715441.aspx
.Net framework 2.0 SP2 is also included .Net framework 3.5 SP1 components.
Microsoft is still investigating the issue and understands the difficult impact that this change has on customers. Determining the full impact of the issue (for example, what are all the data types that can cause the issue etc) is still a work in progress.
You can track the progress from the connect site below.
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=416455
In the meantime, we suggest that you use one of the workarounds mentioned below.
Workaround:
Workaround#1: (recommended)
Modify the SSIS package to redirect the DataReader (or ADO .Net Source in Visual Studio 2008) Error Output to a text file, thereby allowing the package to succeed even though no rows are written out to the error output file.
A. Go to Data Flow Task.
B. On DataReader Source Properties-> ‘Input and Output Properties’ Tab -> DataReader OutPut -> Output columns
C. Select the columns (only with character data type) and change the ‘ErrorRowDisposition’ and TruncationRowDisposition’ properties to RD_RidectRow
D. Redirect the DataReader Error Output to a text file
E. Repeat A-D for all Data Flow Tasks that fail with the above error.
Workaround#2:
If you need a quick fix (because this is a production environment and you cannot afford to modify SSIS packages at this time) – you may need to uninstall the components of .Net Framework 3.5 SP1 or .Net framework 2.0 SP2, depending on what framework version you installed that caused the issue.
a. If your issue is caused by installing only .Net framework 2.0 SP2 (for example, from a Microsoft download site https://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F&displaylang=en), then you can uninstall .Net framework 2.0 SP2.
b. If your issue is caused by installing .Net framework 3.5 SP1 (KB https://support.microsoft.com/kb/951847), Remove the .Net Framework 3.5 SP1 components and bring the system back to the state it was in before the update. This process involves more than simply uninstalling .Net Framework 3.5 SP1, as discussed in the following blogs:
https://blogs.msdn.com/dougste/archive/2008/08/19/uninstalling-net-framework-3-5-sp1.aspx
https://blogs.msdn.com/astebner/archive/2008/08/01/8803442.aspx
Posted By: Azim Uddin & Enamul Khaleque
Comments
Anonymous
April 09, 2009
PingBack from http://microsoft-sharepoint.simplynetdev.com/after-installation-of-net-framework-35-sp1-or-net-framework-20-sp2-ssis-packages-using-odbc-3rd-party-drivers-may-fail/Anonymous
May 19, 2009
Error: SSIS Error Code DTS_E_INDUCEDTRANSFAnonymous
September 02, 2009
Another workaround is to modify the source query and do a case statement for every character field to replace a '' with a ' ' (space). EX: CASE WHEN CustName = '' THEN ' ' ELSE CustName END AS CustNameAnonymous
September 03, 2009
Could you do the redirect back to a SQL database table?Anonymous
May 30, 2010
Thanks - workaround #1 was successful for me.Anonymous
December 08, 2010
Hello, Could you please present the first workaround using the Ado Not Sorce?(I do not have available the Data Reader Source Flow) Many thanks!Anonymous
April 26, 2011
Solution described in: support.microsoft.com/.../969845Anonymous
June 20, 2016
The comment has been removed