尝试通过 Excel 和 Power Query 访问 Oracle 12c 数据库时,我收到一条错误消息,指出
The recommended provider("Oracle.DataAccess.Client") is not installed. You
can continue with your current provider, however it has been deprecated and
may not work correctly.
我阅读了微软自己的指南(https://support.office.com/en-us/article/connect-to-an-oracle-database-power-query-d7fbd231-a705-4eb7-83b3-a66bfb678395?ui=en-US&rs=en-US&ad=US)安装 ODAC。我的规格是:
Windows 10 64-Bit
Excel for Office 365 MSO (16.0.11425.20200) 64-bit
Oracle 12c
因此,按照微软指南,我安装了
64-bit ODAC 12c Release 4 (12.1.0.2.4) Xcopy for Windows x64
(我还尝试了版本 1 和 2 以及每个版本的非 Xcopy 版本,但无济于事)。ODAC 12c Release 4 包括以下内容:
64-bit Oracle Data Provider for .NET 4 12.1.0.2.0
64-bit Oracle Data Provider for .NET 2.0 12.1.0.2.0
64-bit Oracle Providers for ASP.NET 4 12.1.0.2.0
64-bit Oracle Providers for ASP.NET 2.0 12.1.0.2.0
64-bit Oracle Provider for OLE DB 12.1.0.2.0
64-bit Oracle Services for Microsoft Transaction Server 12.1.0.2.0
64-bit Oracle Instant Client 12.1.0.2.0
尝试在 Excel 中连接到 Oracle 数据库时出现多个错误:
首先,我点击
Data > Get Data > From Database > From Oracle Database
出现一个消息框/错误,指出
The recommended provider("Oracle.DataAccess.Client") is not installed. You
can continue with your current provider, however it has been deprecated and
may not work correctly.
我不确定为什么在安装 Microsoft 推荐的 ODAC 时会出现此消息。尽管如此,我还是点击了
'OK'
出现一个输入框,标题为:
Oracle database
在服务器字段中输入:
%HOSTNAME%:%PORT%\%SERVICE_NAME%
出现新的错误消息:
"Unable to Connect"
"We encountered an error while tyring to connect."
Details: "Failed to find or load the registered .Net Framework Data
Provider.. This is a configuration issue with the file
'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config'."
此时我无法继续,无法连接到 Oracle 数据库。任何见解都将不胜感激。
答案1
Oracle Client 安装简直是一场噩梦。多年来,我浪费了太多时间。我有一台使用 Oracle 11 的机器,所以我想尽可能长时间地保留它……
我怀疑 ODAC 本身是不够的,我会尝试先安装带有管理选项的完整 Oracle 客户端,然后在其上添加 ODAC。