请求的 OLE DB 提供程序 Microsoft.ACE.OLEDB.16.0 未注册。如果没有安装32位驱动,运行64位模式下的包

The requested OLE DB provider Microsoft.ACE.OLEDB.16.0 is not registered. If the 32-bit driver is not installed, run the package in 64-bit mode

我正在使用 Visual Studio 2017 创建一个 SSIS 包。 我有一台 Win 10 64 位机器和 MS Office 2016 64 位机器。

来源:SQL服务器数据库

目的地:Excel

在 Excel 连接管理器上,我选择了 Excel 版本“Microsoft Excel 2016”

创建的连接字符串如下:

Provider=Microsoft.ACE.OLEDB.16.0;Data Source=\MyServer\MyFilePath\MyXLSFile20210303.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";

在 Excel 目标上,我收到此错误:

The requested OLE DB provider Microsoft.ACE.OLEDB.16.0 is not registered. If the 32-bit driver is not installed, run the package in 64-bit mode. An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".

我的包 > 属性 > 调试 > Run64BitRuntime 已经设置为 True。

我安装了“Microsoft Access Database Engine 2016 64 位”(我从 https://www.microsoft.com/en-us/download/details.aspx?id=54920 下载)。

我无法安装 32 位版本,因为我收到错误消息“您无法安装 32 位版本的 Microsoft Access Database Engine 2016,因为您目前安装了 64 位 Office 产品”。

我该如何解决这个错误?

谢谢

右键单击 SSIS 项目和 select 属性。在

配置属性,select 调试并将 Run64BitRuntime 更改为 True。

这将允许处于调试模式的包 运行 使用 64 位架构而不是 32 位架构。

一旦您尝试将程序包从您的计算机移动到实际服务器,请记住在服务器上部署 ACE 驱动程序。

有点复杂。

Visual Studio2017 是 32 位应用程序。这就是为什么它需要在 dev 上安装 32 位 ACE 提供程序。机.

可以在同一台机器上安装 ACE 提供程序的两个版本,即 32 位和 64 位。命令提示符处的 /quiet 标志允许这样做。 请看下面的屏幕截图。

作为最终结果,您需要以下内容:

  • SSIS 开发人员。机器:32 位 ACE 提供程序,VS,Run64BitRuntime 设置为 False。
  • SSIS 运行-服务器上的时间,64 位 ACE 提供程序。