zoukankan      html  css  js  c++  java
  • 不能在 64 位 SQL Server 上在进程中加载 32 位 OLE DB 访问接口“Microsoft.ACE.OLEDB.12.0”。

    在64位的机器上安装64位的 Microsoft.ACE.OLEDB.12.0

    http://www.microsoft.com/zh-cn/download/details.aspx?id=13255

     可视化修改导入功能,允许在进程中使用:

    tsql脚本修改导入功能,允许进程内使用,然后执行sql

    --开启导入功能
    exec sp_configure 'show advanced options',1
    reconfigure
    exec sp_configure 'Ad Hoc Distributed Queries',1
    reconfigure
    
    --允许在进程中使用ACE.OLEDB.12
    EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
    reconfigure
    ----允许动态参数
    EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
    reconfigure
    
    select * from OpenDataSource('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;HDR=Yes;IMEX=1;Database=E:desktop\_tempsheet1.xls')...[Sheet4$]
    select * from OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=E:desktop\_tempsheet1.xls;hdr=yes;imex=1', sheet4$)
    select * from OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=E:desktop\_tempsheet1.xls;hdr=yes;imex=1', sheet5$)
    select * from OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=E:desktop\_tempsheet1.xls;hdr=yes;imex=1', sheet6$)
    
    --关闭导入功能
    exec sp_configure 'Ad Hoc Distributed Queries',0
    reconfigure
    exec sp_configure 'show advanced options',0
    reconfigure
  • 相关阅读:
    [转]shell getopts用法
    [转]KVM虚拟化原理探究
    [转]存储相关的一些概念解释
    [转]绑定设备到驱动
    [转] SCSI, FC, ISCSI协议
    [转译]zoned storage device
    CORS jsonp
    orange---openresty.---authorization,-129.0.1.227,jwt
    vue
    hive sqoop,sqoop-hive import data
  • 原文地址:https://www.cnblogs.com/hofmann/p/12430423.html
Copyright © 2011-2022 走看看