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。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值