Dan English's BI Blog

Welcome to my random thoughts in regards to Business Intelligence, databases, and other technologies

Archive for March 29th, 2009

SSIS 2008 ADO NET Source issue with SSAS data source – error code 0×80004002

Posted by denglishbi on March 29, 2009

A few weeks back I upgraded a SSIS 2005 package to SSIS 2008 and ran into a issue with my Data Flow Task source.  In the original package I was using a DataReader source to query information from Analysis Services (SSAS) and during the upgrade this gets converted to a ADO NET source in SSIS 2008.  The reason I was using a DataReader with an ADO.NET connection manager was because you could get around the annoying about being unable to map external data properly and that it will use the DT_WSTR data type when you try to preview the results of your query for the data source.


I did a blog posting last year Using Reporting Services (SSRS) with SSAS data where I went through some different options of getting SSAS data into a format to easily use with SSRS.  This is when I basically decided that I would use the DataReader over the OLE DB source when using SSAS.  Also, if you use the OLE DB data source and have the Data Flow Task embedded in a Loop container this could cause some issues depending on the connection manager setting (more on this later).

So back to the ADO NET source issue… after I did my upgrade and ran my package I noticed a couple of things now with the ADO NET source.  First you get a warning message now in regards to the data type that I did not get with the DataReader source in SSIS 2005:

Warning    3    Validation warning. ADO Source: {568FF45A-6A41-43F8-A122-4BBFF40DD7BF}: The data type "System.Object" found on column "[Measures].[Reseller Sales Amount]" is not supported for the component "ADO NET Source" (1). This column will be converted to  DT_NTEXT.      Package2.dtsx    0    0   

And then now when the package is executed the ADO NET source does not work pulling to extract the SSAS data in the Data Flow Task even though you can Preview the data just fine:



And the Error messages that I got were not what I would consider helpful in resolving the issue:

[ADO NET Source [43]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "ADO NET Source" (43)" failed because error code 0x80004002 occurred, and the error row disposition on "output column "[Measures].[Reseller Sales Amount]" (67)" 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.

[ADO NET Source [43]] Error: The component "ADO NET Source" (43) 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" (43) 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.

I was able to find a KB Article that talks about a similar issue when using Oracle (http://support.microsoft.com/kb/959794), so I thought I just needed to install the SQL Server CU2 or higher.  I went with the SQL Server 2008 CTP SP1 just to make sure I was using the latest and greatest and unfortunately this did not resolve my issue.  So what do I do now… post the issue on Microsoft ConnectNerd  I went ahead and logged the bug on Connect here – SSIS 2008 ADO NET Source issue with SSAS data source – error code 0x80004002 and have already gone back and forth a couple of times with Microsoft about the issue.  You might sense some of my frustration in the bug posting.  I did decide to move on with the development and switch the data source over to an OLE DB source.  This brings up what I consider to be a bug with that data source is that when the Data Flow Task is embedded in a Foreach Loop container you need to make sure that you put a Script Task after (or this could be before I guess) the Data Flow Task that puts the thread to sleep prior to performing the next loop.  If you don’t you will get the following error:

[SSAS OLEDB Cube Source [928]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E05.
An OLE DB record is available.  Source: "Microsoft OLE DB Provider for Analysis Services 2008."  Hresult: 0x00000001  Description: "Error Code = 0x80040E05, External Code = 0x00000000:.".

[SSIS.Pipeline] Error: component "SSAS OLEDB Cube Source" (928) failed the pre-execute phase and returned error code 0xC0202009.

So what do you need to get around this issue?  You need to make sure that the ‘RetainSameConnection’ property on the OLE DB connection manager is set to ‘False’.  I also had some initial issues after changing that property value, so I also added a Script Task to the Control Flow within the Foreach Loop Container after the Data Flow Task with a single line of code that puts the thread to sleep (yes I am a fan of Visual Basic and the code for C# is not different for this except you need to include semicolons):

    Public Sub Main()

        Dts.TaskResult = ScriptResults.Success

    End Sub

Once you have verified the connection manager property and have this added to the Control Flow the package will run fine.  Still get the annoying warning messages when trying to preview and work with the OLE DB source, but at least the package runs.

Here is the final layout of my SSIS 2008 package:


If you would like this issue with the ADO NET source resolved so that you can use this with SSAS then please vote for this bug here – SSIS 2008 ADO NET Source issue with SSAS data source – error code 0x80004002Thumbs-up

Also, if you want to setup the SQL command for the ADO NET source so that it is dynamic you can do this within the Control Flow by using an expression on the Data Flow Task for the ADO NET source SqlCommand property (same thing for SSIS 2005 and the DataReader source).  It would be nice if you could just reference a variable within the ADO NET data source editor like the OLE DB source, but oh wellThinking

Posted in Integration Services | Tagged: , | 7 Comments »

SQL Server 2008 Management Studio (SSMS) displaying incorrect build number?

Posted by denglishbi on March 29, 2009

One way to verify the version of your SQL Server components like the database engine, Reporting Services (SSRS), Analysis Services (SSAS), and Integration Services (SSIS) is by connecting to the component with SQL Server Management Studio (SSMS).  Once you connect to one of these components you will see the name of the component along with the version number information and your connection information.  Here is an example of what you will see (not the SSRS and SSIS information):


In looking at this we can see that I have installed SQL Server 2008 CU3 (SQL Server 2008 Build List – 2520 is not listed, but that is for CTP SP1).  The odd thing is that SSRS and SSIS state that I am running build number 1600 which is the RTM release…  That is oddThinking  So how can I verify the version information for these two products or did I really install CU3 for just the database engine and SSAS?

There are quite a few ways to check out the build for both of these two products (and I won’t go into each option here).  For SSRS if I take a look at the properties I will see this information:


And you can see that I am actually on the CU3 build and not RTM.  So now for SSIS I can take a look at the actual version number of the MsDtsSrvr.exe file in the %programfiles%Microsoft SQL Server100DTSBinn directory, but I would see this:


So that doesn’t help out at all.  Apparently this has not been updated since RTM…well then lets take a look at a file in the CU3 list that was updated for Integration Services like dtexec.exe.  By doing so you will see this information:


There are other ways to check out your SSIS build number (How to determine the version of SQL Server 2005 Integration Services), but in my case the information displayed the RTM build until I verified a specific file that was updated like dtexec.exe.

So if this is annoying for you and you would like to see this corrected then please vote on this bug on the Microsoft Connect site – Incorrect Version (build) number in SSMS with SSRS and SSISThumbs-up

And by the way, you need to be on at least CU3 if you are using SQL Server 2008 maintenance plans and do not have SSIS installed on the same server – FIX: Error message when you run a maintenance plan in SQL Server 2008: "The SQL Server Execute Package Utility requires Integration Services to be installed".  So if you don’t want to install SSIS on your database engine server then make sure you install CU3 if you are planning on using maintenance plansSmile

UPDATE (4/4/2009): I received two comments yesterday in regards to this bug from Microsoft on the Connect site.  I am assuming this means Kilimanjaro?  Or maybe SP2 (unless it will be part of SP1)…

This bug has been fixed for the next release of SQL Server.
Posted by Microsoft on 4/3/2009 at 4:15 PM
The problem with SSMS and SSRS has been fixed for the next release. We are following up on the IS problem.
Posted by Microsoft on 4/3/2009 at 4:23 PM

UPDATE (4/5/2009): I guess it will be fixed in SP1…so I guess I will need to wait until the RTM of SP1 to see if this is the case or not.  Here is the last comment I just got today from Microsoft:

Thank you for filing this bug.

To clarify, this bug should be fixed in Katmai PCU1 also called Katmai SP1. If you do not find this to be the case, please re-activate this issue or file a new bug in this regard.


Posted by Microsoft on 4/5/2009 at 7:24 PM

UPDATE (6/2/2009): This is still a bug with SQL Server 2008 SP1.  Check out one of my more recent blog entries – SQL Server 2008 SP1 Available and Install Experience – build 2531.

Posted in SQL Server | Tagged: | Leave a Comment »