SSIS:与不同的驱动程序有两个不同的错误。 一个是32位,另一个是64位。 以32位运行会导致另一个驱动程序失败

我正在处理一个SSIS包,它连接到服务器并将数据转储到Excel文件中,然后通过电子邮件将该Excel文件发送到客户端。 我正在使用ADO.net(提供程序:.Net Providers \ Odbc Data Provider)驱动程序来连接服务器,它是64位和Excel目标连接我的本地文件。 当我开始在属性Run64BitRUNtime = true SSDT中运行包时,出现以下错误。

  Source: CFEReport Connection manager "Excel Connection Manager" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2016-06-17 13:27:56.81 Code: 0xC020801C Source: CFE Report Generation Excel Destination [32] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error: 2016-06-17 13:27:56.82 Code: 0xC0047017 Source: CFE Report Generation SSIS.Pipeline Description: Excel Destination failed validation and returned error code 0xC020801C. End Error Error: 2016-06-17 13:27:56.82 Code: 0xC004700C Source: CFE Report Generation SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2016-06-17 13:27:56.82 Code: 0xC0024107 Source: CFE Report Generation Description: There were errors during task validation. 

所以我search了互联网,发现我应该设置该属性Run64BitRUNtime = false并运行在32位。 我尝试了,我能够成功地运行它。 但是当我试图在SQL Server 2012中创build作业并运行它时,我得到以下错误。 (我还设置了SQL作业中的属性,通过在执行选项中选中Use 32 Bit runtime选项在32位环境中运行它)

  Microsoft (R) SQL Server Execute Package Utility Version 11.0.6020.0 for 32-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 1:19:17 PM Error: 2016-06-17 13:19:17.98 Code: 0xC0208449 Source: CFE Report Generation RAR TableQuery [93] Description: ADO NET Source has failed to acquire the connection {F2DAE648-B39C-4F43-8EBE-BBA6E11EC7AA} with the following error message: "ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application". End Error Error: 2016-06-17 13:19:17.98 Code: 0xC0047017 Source: CFE Report Generation SSIS.Pipeline Description: RAR TableQuery failed validation and returned error code 0xC0208449. End Error Error: 2016-06-17 13:19:17.98 Code: 0xC004700C Source: CFE Report Generation SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2016-06-17 13:19:17.98 Code: 0xC0024107 Source: CFE Report Generation Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 1:19:17 PM Finished: 1:19:17 PM Elapsed: 0.78 seconds. The package execution failed. The step failed. 

你能帮助解决这个问题吗? 在此先感谢我想在64位运行此包,我该怎么做才能使用它。

一个司机存在于32位的空间里,一个司机在64位,而这个司机永远不会见面。 您的select是在相反的空间find一个驱动程序,或将您的软件包分成两个独立的软件包,以便您可以使用32位dtexec和64位dtexec运行一个。 在这种情况下,RAW文件的目的地/来源可能会有所帮助。

我最近在将我的SSIS软件包部署到64-bit DEV SQL Server时遇到了这个问题。

解决scheme是在64-bit SQL Server服务器上安装64-bit版本的Microsoft Access数据库引擎2010 Redistributable

确保你select了在exe名称中有_64的那个,如下所示。

在这里输入图像描述

此可再发行组件包含所有Office文件(包括MS Access,MS Excel和MS Word)使用的Microsoft.Jet.OLEDB.4.0驱动程序的64-bit版本。 所以不要担心它的名字。

一个简单的解决方法是将文件保存为CSV,然后用Excel打开它。 这将允许您使用64位的偏好。 另一种方法是尝试使用64位ODBC驱动程序。

Microsoft Access数据库引擎2010可再发行组件

(它声称它是Access数据库引擎,但是如果你看“附加信息”,它也列出Excel作为这个包的一部分)

我会很好奇,知道这是如何解决你的。

所有的答案基本上是正确的,指出你使用32位执行的文章没有帮助,如果你实际上运行64位的驱动程序根本没有安装。 作为@Shiva指向你的大部分Excel工作的正确驱动程序,你将需要。 如果你想运行32位,select32的AccessDatabaseEngine。如果你想64获得64版本。 如果您想要保存比Office 2010更早的文件格式,则要进一步复杂化,那么您实际上也需要Access 2007驱动程序,并且必须在安装2010版之前安装它。 那么如果你想使用2013和更新版本的Excel,那么你实际上需要更新的AccessDatabaseEngine驱动程序。

所以我做什么,因为我从许多不同的来源获得Excel文件是我得到所有的Access数据库引擎驱动程序,并按照最旧到最新的顺序安装它们,我可以select最适合我工作的工作。 在你的情况下,因为你正在创buildExcel文件,所以在select你想要的驱动程序方面有更多的灵活性。

这只是最后一块。 您将需要开发系统上的驱动程序和实际运行SSIS作业的服务器。