Monday, February 20, 2012

Programatically created DataFLow task fails

Hi,

I have a package in which i have programatically created dataflow task. It used to work fine but now it fails with series of errors out of which one is below

Error 30002: Type 'MainPipe' is not defined. Line 63 Columns 33-40 Line Text: Dim DataFlowTask As MainPipe = CType(DataFlowTaskHost.InnerObject, MainPipe)

It seems all the function and classes referd from following dlls is not working:

Microsoft.SqlServer.DTSRuntimeWrap.dll

Microsoft.SqlServer.DTSPipelineWrap.dll

I say so because i get the following error also:

Error 30652: Reference required to assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' containing the type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager90'. Add one to your project. Line 86 Columns 33-64 Line Text: DtsConvert.ToConnectionManager90(ChildPackage.Connections(""Source""))

These dlls are in GAC and in C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies with same version but still it gives above error.

Thanks

Mohit

Mohit,

If it used to work and now it doesn't (as you suggest) then if it were me I would try and track down what got changed in the interim.

-Jamie

|||

Hi Jamie,

There is no change in code because it was deployed in production. Is there possibility of this error being caused by any SQL server service pack or hotfix on the server.

Thanks

Mohit

|||

MohitGupta wrote:

Hi Jamie,

There is no change in code because it was deployed in production. Is there possibility of this error being caused by any SQL server service pack or hotfix on the server.

Thanks

Mohit

yes, its certainly a possibility. That's what I meant by identify what has changed. Code changes? Service pack changes? Windows Update changes? They're all changes that could *potentially* cause problems.

-Jamie

|||

Jamie Thomson wrote:

MohitGupta wrote:

Hi Jamie,

There is no change in code because it was deployed in production. Is there possibility of this error being caused by any SQL server service pack or hotfix on the server.

Thanks

Mohit

yes, its certainly a possibility. That's what I meant by identify what has changed. Code changes? Service pack changes? Windows Update changes? They're all changes that could *potentially* cause problems.

-Jamie

Any pointers to the article resolving this specific error will be very helpful.

Mohit

|||

MohitGupta wrote:

Jamie Thomson wrote:

MohitGupta wrote:

Hi Jamie,

There is no change in code because it was deployed in production. Is there possibility of this error being caused by any SQL server service pack or hotfix on the server.

Thanks

Mohit

yes, its certainly a possibility. That's what I meant by identify what has changed. Code changes? Service pack changes? Windows Update changes? They're all changes that could *potentially* cause problems.

-Jamie

Any pointers to the article resolving this specific error will be very helpful.

Mohit

Have you added the reference that it talks about?

-Jamie

|||

Jamie Thomson wrote:

MohitGupta wrote:

Jamie Thomson wrote:

MohitGupta wrote:

Hi Jamie,

There is no change in code because it was deployed in production. Is there possibility of this error being caused by any SQL server service pack or hotfix on the server.

Thanks

Mohit

yes, its certainly a possibility. That's what I meant by identify what has changed. Code changes? Service pack changes? Windows Update changes? They're all changes that could *potentially* cause problems.

-Jamie

Any pointers to the article resolving this specific error will be very helpful.

Mohit

Have you added the reference that it talks about?

-Jamie

Yes the dlls are refered from the following location: C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies

|||

MohitGupta wrote:

Yes the dlls are refered from the following location: C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies

That's wrong. Reference them from the GAC.

-Jamie

|||

Jamie Thomson wrote:

MohitGupta wrote:

Yes the dlls are refered from the following location: C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies

That's wrong. Reference them from the GAC.

-Jamie

When the dll reference is added there is no option to browse and add assembly. It shows .NET assemblies which are from GAC out of which both the dll have this path: C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies in the property box. This is on my development machine. But in dtsx file, it does not have any reference of this path. Below is the code generated used in production server:

<Reference

Name = "Microsoft.SqlServer.DTSPipelineWrap"

AssemblyName = "Microsoft.SqlServer.DTSPipelineWrap"

/>

<Reference

Name = "Microsoft.SQLServer.DTSRuntimeWrap"

AssemblyName = "Microsoft.SqlServer.DTSRuntimeWrap"

/>

I assume it is coming from GAC.

-Mohit

|||

MohitGupta wrote:

Jamie Thomson wrote:

When the dll reference is added there is no option to browse and add assembly. It shows .NET assemblies which are from GAC out of which both the dll have this path: C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies in the property box. This is on my development machine. But in dtsx file, it does not have any reference of this path. Below is the code generated used in production server:

<Reference

Name = "Microsoft.SqlServer.DTSPipelineWrap"

AssemblyName = "Microsoft.SqlServer.DTSPipelineWrap"

/>

<Reference

Name = "Microsoft.SQLServer.DTSRuntimeWrap"

AssemblyName = "Microsoft.SqlServer.DTSRuntimeWrap"

/>

I assume it is coming from GAC.

-Mohit

This "property box" that you speak of. What object does that contain the properties of? On my machine I check properties of Microsoft.SqlServer.DTSPipelineWrap in c:\windows\assembly and there is no mention of a path anywhere. I'm confused.

The .dtsx file will not contain paths to DLLs, that's the whole point of GACing them.

-Jamie

|||

Finally I got resolution to this issue Smile

Cause:

Security Update for Microsoft .Net Framework 2.0 (KB928365) is installed on the server which causes SSIS packages to fail (Specifically custom data flow tasks using GACed dll)

Resolution:

Install this KB: SQLServer2005-KB932557-x86-ENU.exe on the server.

Link: http://support.microsoft.com/kb/932557/

This KB while installing gives option to Install the patch only for SQL Server Integration Services 2005 and SQL Server Tools and Workstation Components 2005. This KB is not required to be installed for SQL Server Instances. (Restart not required)

Known Issue:

After installing this KB, few warnings may be displayed which are known issues with SSIS.

Thanks

Mohit

No comments:

Post a Comment