无法初始化 OLE DB 提供程序“Microsoft.ACE.OLEDB.12.0"的数据源对象对于链接服务器“(空)"; [英] Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
问题描述
当我在 SQL Server 2012 中运行以下命令时
exec sp_configure 'Advanced', 1 RECONFIGUREexec sp_configure 'Ad Hoc 分布式查询',1 重新配置EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1SELECT * INTO dbo.Normalization FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=c:\_sandbox\Consolidations.xlsx','SELECT * FROM [Codes and Values$]')
我收到此错误
<块引用>无法初始化 OLE DB 提供程序的数据源对象链接服务器(null)"的Microsoft.ACE.OLEDB.12.0".
知道为什么吗?
是否安装了提供程序?默认情况下,Microsoft.ACE.OLEDB.12.0 提供程序不存在,因此如果您尚未安装它,它将无法初始化.
查看 SQL management studio 中的 Server Objects -> Linked Servers -> Providers,看看它是否被列出.
如果没有,您需要安装 Microsoft Access 数据库引擎(x86 或 x64,具体取决于您的 SQL 服务器安装),它将为您安装提供程序.
在此处下载软件:
Microsoft Access 数据库引擎 2010 可再发行>
When I run the following commmands in SQL Server 2012
exec sp_configure 'Advanced', 1 RECONFIGURE
exec sp_configure 'Ad Hoc Distributed Queries', 1 RECONFIGURE
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
SELECT * INTO dbo.Normalization FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=c:\_sandbox\Consolidations.xlsx','SELECT * FROM [Codes and Values$]')
I get this error
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
Any idea why?
Is the provider installed? The Microsoft.ACE.OLEDB.12.0 provider isn't there by default and so if you haven't installed it the it won't be able to be initialised.
Have a look in SQL management studio in Server Objects -> Linked Servers -> Providers and see if it is listed.
If not, you need to install the Microsoft Access Database Engine (either x86 or x64 depending on your SQL server install) which will install the provider for you.
Download the software here:
Microsoft Access Database Engine 2010 Redistributable
这篇关于无法初始化 OLE DB 提供程序“Microsoft.ACE.OLEDB.12.0"的数据源对象对于链接服务器“(空)";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!