Server Error in '/' Application. The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the lo



Server Error in ‘/‘ Application.
--------------------------------------------------------------------------------


The ‘Microsoft.ACE.OLEDB.12.0‘ provider is not registered on the local machine. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 


Exception Details: System.InvalidOperationException: The ‘Microsoft.ACE.OLEDB.12.0‘ provider is not registered on the local machine.


Source Error: 


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


操作系统:Windows Server 2003 32位企业版
数据库:SqlServer 2005 32位企业版
环境:SqlServer 2005 SSIS package

在SSIS的package中读取.xlsx文件,因为SQL SERVER 2005不支持直接读取此类文件,所以采取用‘Microsoft.ACE.OLEDB.12.0来读取,包执行中提示错误:The ‘Microsoft.ACE.OLEDB.12.0‘ provider is not registered on the local machine.
即:(未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序)


解放办法:

1, 在SSIS项目中选择属性:Debugging中将Run64bitRuntime设置成true

2,调用C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe
一定要是(X86)这个文件夹下的哦,这个命令行工具的具体用法可以查看MSDN


完整步骤:

在JOB中调用package的时候,我的确是用的DTExec.exe这个工具,但我用的是默认的x64的。
看了您的建议以后我改用x86的DTExec,可以成功。
再次感谢!

现在我将此问题总结一下:



1.在用SQL SERVER 2005访问.xlsx文件(office2007&2010文件格式)时,必须用
provider ‘Microsoft.ACE.OLEDB.12.0‘ 来实现。
2.首先要安装AccessDatabaseEngine.exe。
下载路径:http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en
3.在32位系统中可以在数据库中看见这个provider。
4.在64位系统中不能看见它,这时需调用
C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe
来执行package。

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。