Assume that you create a Microsoft SQL Server Integration Services (SSIS) package in Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008. When you try run the package in 64-bit mode, you find that you cannot run the package. Additionally, you may receive one or more of the following error messages, depending on the tasks or components in the package:
The package contains an ADO.Net source:
Error: <Time Stamp> Code: 0xC0047062 Source: Data Flow Task ADO NET Source  Description: System.InvalidCastException: Specified cast is not valid. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.GetSqlCommand() at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.Validate() at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostValidate(IDTSManagedComponentWrapper100 wrapper) End Error
The package contains an XML source:
[XML Source ] Error: The "component "XML Source" (1)" is missing the required property "AccessMode". The object is required to have the specified custom property. [SSIS.Pipeline] Error: "component "XML Source" (1)" failed validation and returned validation status "VS_ISCORRUPT".
The package contains a sending mail task:
Error: <Time Stamp> Code: 0xC0014005 Source: Description: The connection type "SMTP" specified for connection manager "SMTP Connection Manager" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name. End Error
Note When you run the package in 32-bit mode, the package runs successfully.
The issue occurs because the native 64-bit image of the specific Microsoft .NET Framework assembly that is used by the SSIS task or component becomes corrupted. For example:
For an ADO.NET source, the .NET Framework assembly is Microsoft.SqlServer.ADONETSrc.dll. Therefore, the native image Microsoft.SqlServer.ADONETSrc.ni.dll becomes corrupted.
For an XML source, the .NET Framework assembly is Microsoft.SqlServer.XMLSrc.dll. Therefore, the native image Microsoft.SqlServer.XMLSrc.ni.dll becomes corrupted.
For an SMTP connection, the .NET Framework assembly is Microsoft.SqlServer.SendMailTask.dll. Therefore, the native image Microsoft.SqlServer.SendMailTask.ni.dll becomes corrupted.
To resolve this issue, use one of the following methods:
Uninstall the native assembly, and then reinstall the native assembly by using ngen command.
To uninstall and reinstall the Microsoft.SqlServer.ADONETSrc.dll native assembly image, follow these steps:
Uninstall the native assembly image by using a command that resembles the following:
Note Ngen.exe is part of the Microsoft Visual Studio command tools. You have to select the correct platform. For example, you have to select a 64-bit or 32-bit platform. On computers on which you do not have Visual Studio installed, you can copy the appropriate Ngen.exe file from a development computer on which you have Visual Studio installed. Or, you can install Ngen.exe by using Windows SDK.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Microsoft SQL Server 2008 Integration Services, Microsoft SQL Server 2008 R2 Enterprise, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 Standard, Microsoft SQL Server 2008 R2 Integration Services, Microsoft SQL Server 2008 R2 Standard