C# 如何从 .NET 使用 Oracle?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11366695/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I use Oracle from .NET?
提问by Luke Puplett
Unfortunately, I'm trying to use Oracle from .NET and it's like going to back to 1997. Explaining things properly is a sign of weakness and the registry and environment variables seem to feature.
不幸的是,我正在尝试从 .NET 使用 Oracle,这就像回到 1997 年。正确解释事情是弱点的标志,并且注册表和环境变量似乎具有功能。
So here's how far I've got.
所以这是我有多远。
I filled out a huge form about my life at Oracle.com and downloaded the
我在 Oracle.com 上填写了一份关于我生活的巨大表格并下载了
ODBC Windows 64-bit Instance Client, 11.2.0.3.0and unzipped it into a folder. Basic Windows 64-bit Instant Client, 11.2.0.3.0and unzippped it into the same folder as above.
ODBC Windows 64 位实例客户端,11.2.0.3.0并将其解压缩到一个文件夹中。 Basic Windows 64-bit Instant Client, 11.2.0.3.0并将其解压缩到与上述相同的文件夹中。
I ran the install .exe (no MSI, remember this is 1997).
我运行了安装 .exe(没有 MSI,请记住这是 1997 年)。
I added a TNS_NAMES environment variable pointing at the corporate TNSNames.ora file on a network share and setup a quick DSN in Control Panel and ran the test - it worked!
我添加了一个 TNS_NAMES 环境变量,指向网络共享上的公司 TNSNames.ora 文件,并在控制面板中设置了一个快速 DSN 并运行了测试 - 成功了!
I then downloaded the XCOPY version of the latest ODP.NET for .NET 4.0 and copied it into my Dependencies folder under my source control workspace.
然后,我下载了适用于 .NET 4.0 的最新 ODP.NET 的 XCOPY 版本,并将其复制到我的源代码控制工作区下的 Dependencies 文件夹中。
I added a reference from my project to Dependencies\odp.net4\odp.net\bin\4\Oracle.DataAccess.dll
我从我的项目中添加了一个对Dependencies\odp.net4\odp.net\bin\4\Oracle.DataAccess.dll的引用
I've read that I need to let the managed ODP.NET stuff know where it can find its unmanaged Oracle libraries, which I'm guessing is Dependencies\odp.net4\bin\OraOps11w.dllbut it could be some other Oracle binaries somewhere?
我读过我需要让托管 ODP.NET 的东西知道在哪里可以找到它的非托管 Oracle 库,我猜是Dependencies\odp.net4\bin\OraOps11w.dll但它可能是其他一些 Oracle 二进制文件某处?
Now I'm setting a config file parameter called DllPath. Sadly, the Oracle docs seem not to realise that .NET configuration files need their sections hooking up in the configSections section.
现在我正在设置一个名为 DllPath 的配置文件参数。遗憾的是,Oracle 文档似乎没有意识到 .NET 配置文件需要将它们的部分连接到 configSections 部分。
Here is the config file section.
这是配置文件部分。
<oracle.dataaccess.client>
<add key="DllPath" value="D:\Trunk\Dependencies\odp.net4\bin" />
</oracle.dataaccess.client>
What goes in the configSection? The few threads I've found on this give an example and then say "I don't know what type= should be", which is the main bit!
configSection 中有什么?我在这方面找到的几个线程给出了一个例子,然后说“我不知道 type= 应该是什么”,这是主要的一点!
Can anyone advise me? Does anyone know a link to a Dummies Guide to Querying an Oracle View from .NET?
任何人都可以给我建议吗?有人知道从 .NET 查询 Oracle 视图的傻瓜指南的链接吗?
Is there something I can do in 1997 to stop myself having to use Oracle in 2012?
我在 1997 年可以做些什么来阻止自己在 2012 年不得不使用 Oracle?
UPDATE
更新
Just a quick update. I've copied OraOps11w.dll into my output bin folder and removed any web.config file changes I'd previously added.
只是快速更新。我已将 OraOps11w.dll 复制到我的输出 bin 文件夹中,并删除了我之前添加的所有 web.config 文件更改。
I now get the following error, which I'm researching.
我现在收到以下错误,我正在研究。
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.
无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一。试图加载格式不正确的程序。
Some other forums talk about registering Oracle.DataAccess.dll in the GAC, which I'm keen to avoid - and I can't see what the difference would be anyway, but I'll give it a go.
其他一些论坛讨论在 GAC 中注册 Oracle.DataAccess.dll,我很想避免这种情况——无论如何我看不出有什么区别,但我会试一试。
UPDATE 2
更新 2
Registering the Oracle.DataAccess.dll library in the GAC didn't make any difference and I've unregistered it.
在 GAC 中注册 Oracle.DataAccess.dll 库没有任何区别,我已取消注册它。
The end of the working week is upon me and I have to catch a train, but I've emailed another dev team here and hope they've fought this battle before (and not used nightly extracts like everyone else).
一周的工作即将结束,我必须赶上火车,但我已经给这里的另一个开发团队发了电子邮件,希望他们以前打过这场仗(而不是像其他人一样使用夜间提取物)。
UPDATE 3
更新 3
This morning I downloaded and setup IIS Express 8.0 RC which has a 64-bit version. The 64-bit version is not supported from VS2010 so it needs to be run from the command line. This was fairly simple, by looking in Task Manager, I was able to see what command line VS uses for iisexpress.exe *32.
今天早上我下载并安装了 64 位版本的 IIS Express 8.0 RC。VS2010 不支持 64 位版本,因此需要从命令行运行。这相当简单,通过查看任务管理器,我能够看到 VS 对 iisexpress.exe *32 使用的命令行。
Unfortunately I get this error when browsing to my site hosted by the 64-bit IIS Express.
不幸的是,我在浏览由 64 位 IIS Express 托管的站点时遇到此错误。
Handler "ExtensionlessUrl-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list
处理程序“ExtensionlessUrl-Integrated-4.0”在其模块列表中有一个坏模块“ManagedPipelineHandler”
This is a problem too far down this line of enquiry so I'm going to try using the 32-bit version of ODP.NET.
这是一个在这条查询线中太远的问题,所以我将尝试使用 ODP.NET 的 32 位版本。
UPDATE 4
更新 4
I downloaded the full install of the 32-bit version but I got scared when I saw the Oracle Universal Installer. It looks too 90s to trust with my precious dev box. So I'm using the 32-bit 'XCopy' client, this lets me to bring up my site's homepage, so references are working. Thanks for those that suggested an architecture mismatch 32/64 problem.
我下载了 32 位版本的完整安装,但是当我看到 Oracle Universal Installer 时我很害怕。我的宝贵开发箱看起来太 90 年代了。所以我使用的是 32 位的“XCopy”客户端,这让我可以调出我网站的主页,所以引用是有效的。感谢那些提出架构不匹配 32/64 问题的人。
Now I am looking into this error when instantiating a new OracleConnection.
现在我在实例化一个新的 OracleConnection 时正在调查这个错误。
The provider is not compatible with the version of Oracle client
提供程序与 Oracle 客户端版本不兼容
UPDATE 5I think I've done it.
更新 5我想我已经做到了。
So I downloaded the 32-bit latest 11g "Instant Client" and just put it in my \Dependencies folder for the solution trunk codebase. I added this folder to the %PATH% system environment variable and also chucked the OraOps11w.dll file in there.
因此,我下载了 32 位最新的 11g“即时客户端”,并将其放在我的 \Dependencies 文件夹中以获取解决方案主干代码库。我将此文件夹添加到 %PATH% 系统环境变量,并将 OraOps11w.dll 文件放入其中。
Finally, _oracleConnection = new OracleConnection(connectionString) doesn't throw! Now I need to make sure I've a bottle of Laphroaig on the desk when I come to deploy to prod.
最后,_oracleConnection = new OracleConnection(connectionString) 不会抛出!现在我需要确保在我部署到生产环境时桌上有一瓶 Laphroaig。
So, to recap, for IIS Express 7.5 (which is a 32-bit process) on Windows 7, 64:
因此,回顾一下,对于 Windows 7、64 上的 IIS Express 7.5(这是一个 32 位进程):
Download and extract the 32-bit 11g "Instant Client" to some folder and add this location to your PATH. Oci.dll is the main Oracle client-side unmanaged library.
Download and extract the 32-bit ODP.NET to some folder.
Copy the OraOps11w.dll to the main folder in which the Instant Client resides (above).
Add a TNS_ADMIN environment variable pointing to a folder in which TNSNames.ora text file resides. This is like a hosts file and maps Oracle service names to server host names.
Close and re-open Visual Studio to ensure you pick-up the new environment variables, and add a reference to the Oracle.DataAccess.dll managed assembly in your ODP.NET folder.
下载 32 位 11g“即时客户端”并将其解压缩到某个文件夹,然后将此位置添加到您的 PATH。Oci.dll 是主要的 Oracle 客户端非托管库。
下载 32 位 ODP.NET 并将其解压缩到某个文件夹。
将 OraOps11w.dll 复制到 Instant Client 所在的主文件夹(上图)。
添加指向 TNSNames.ora 文本文件所在文件夹的 TNS_ADMIN 环境变量。这就像一个主机文件,将 Oracle 服务名称映射到服务器主机名。
关闭并重新打开 Visual Studio 以确保您选择新的环境变量,并在您的 ODP.NET 文件夹中添加对 Oracle.DataAccess.dll 托管程序集的引用。
That should be it. Sounds fairly simple when you know how.
应该是这样。当您知道如何操作时,听起来相当简单。
UPDATE 5.1
更新 5.1
Investigating the error below, which I originally didn't report since I was sure it was a firewall issue. The company I'm at has two on each workstation, but I just opened a raw socket to the Oracle server so it can't be.
调查下面的错误,我最初没有报告,因为我确定这是一个防火墙问题。我所在的公司在每个工作站上有两个,但我只是打开了一个到 Oracle 服务器的原始套接字,所以它不能。
ORA-12541: TNS:no listener
ORA-12541: TNS: 没有侦听器
回答by CodingWithSpike
First off, +1 for your unadulterated love of Oracle, and realizing that they are the best company with the best products! ;)
首先,为您对 Oracle 的纯粹热爱 +1,并意识到他们是拥有最好产品的最好公司!;)
Yeah the download and install process is ridiculous. I usually can't even find the right client download on their site, and the Oracle Universal Product Installer thing is terrible.
是的,下载和安装过程很荒谬。我通常甚至无法在他们的站点上找到正确的客户端下载,而且 Oracle Universal Product Installer 的事情很糟糕。
Sometimes you will need a copy of OraOps11w.dllin your \bindirectory. Sometimes not. I've never figured out when its needed and when it isn't, but I think that if your referenced Oracle.DataAccess.dllisn't exactlythe same version as the installed Oracle client, then you need the OraOps11w.dll.
有时您需要OraOps11w.dll在您的\bin目录中复制一份。有时不是。我从来没有弄清楚什么时候需要它,什么时候不需要,但我认为如果你引用的版本与安装的 Oracle 客户端Oracle.DataAccess.dll不完全相同,那么你需要OraOps11w.dll.
Can you explain what you are trying to do in your config file with DllPath? The Oracle install should have registered just about everything it needs in the machine.configfor your .NET Runtime. It has been a while since I set up ODP.NET, but I don't remember there being much to put in the app.config, other than the connection string.
你能解释一下你在你的配置文件中试图做DllPath什么吗?Oracle 安装应该已经machine.config为您的 .NET 运行时注册了它需要的所有内容。自从我设置 ODP.NET 以来已经有一段时间了,但我不记得除了连接字符串之外,在 app.config 中没有太多内容。
回答by Mike Marshall
I don't believe this is a path issue. "An attempt was made to load a program with an incorrect format."is an error that almost always means that you are mixing 32-bit and 64-bit assemblies and DLLs in .NET.
我不相信这是一个路径问题。 “试图加载格式不正确的程序。” 是一个错误,几乎总是意味着您在 .NET 中混合了 32 位和 64 位程序集和 DLL。
I noticed you installed the 64-bit Oracle client, I am assuming since the DSN creation worked that you are on a 64-bit version of the OS? Your problem could be from a number of related scenarios:
我注意到您安装了 64 位 Oracle 客户端,我假设自从 DSN 创建工作以来,您使用的是 64 位版本的操作系统?您的问题可能来自许多相关场景:
- Your copy of OraOps11w.dll could be a 32-bit assembly and you are using it in a 64-bit app
- Your copy of OraOps11w.dll could be a 64-bit assembly and you are trying to use it from a 32-bit app
- one of the unmanaged dependencies of the Oracle Data Provider for .NET is 32-bit and is failing to load into your 32-bit app (or vice versa)
- 您的 OraOps11w.dll 副本可能是 32 位程序集,并且您正在 64 位应用程序中使用它
- 您的 OraOps11w.dll 副本可能是 64 位程序集,并且您正尝试从 32 位应用程序中使用它
- 适用于 .NET 的 Oracle 数据提供程序的非托管依赖项之一是 32 位并且无法加载到您的 32 位应用程序中(反之亦然)
I believe if your app targets x86 specifically, you must install the 32-bit Oracle client package regardless of the underlying OS platform (e.g. you still would need the 32-bit Oracle client for a 32-bit app even if you were using a 64-bit version of Windows)
我相信如果您的应用程序专门针对 x86,则无论底层操作系统平台如何,您都必须安装 32 位 Oracle 客户端包(例如,即使您使用的是 64 -位版本的 Windows)
a couple of things to check:
需要检查的几件事:
- Check your "Platform Target" setting in your assembly that calls the Oracle provider: x64 will always try to run as 64-bit, x86 will always try to run as 32-bit and "Any Platform" will JIT compile to the target OS architecture at runtime (32-bit on an x86 system and 64-bit on a x64 system)
- Run OraOps11w.dll through corflags.exe(see details at this SO post) to see if it is 32-bit, 64-bit or "Any CPU"
- 检查调用 Oracle 提供程序的程序集中的“平台目标”设置:x64 将始终尝试以 64 位运行,x86 将始终尝试以 32 位运行,“任何平台”将 JIT 编译为目标操作系统架构在运行时(在 x86 系统上为 32 位,在 x64 系统上为 64 位)
- 通过corflags.exe运行 OraOps11w.dll (请参阅此 SO 帖子中的详细信息)以查看它是 32 位、64 位还是“任何 CPU”
Lastly, have you tried to built-in .NET data provider for Oracle (System.Data.OracleClient namespace?)
最后,您是否尝试过为 Oracle 内置 .NET 数据提供程序(System.Data.OracleClient 命名空间?)
That's the best I can do since I don't know more about your projects settings for your app.
这是我能做的最好的事情,因为我不太了解您的应用程序的项目设置。
回答by Jim Schubert
I've spent daysin the past trying to get Oracle connected in Windows 7.
过去我花了几天时间试图在 Windows 7 中连接 Oracle。
The problem I encountered was that I had a 32-bit ASP.NET application with the 32-bit Oracle ODP.NET drivers installed. I wasn't aware that, even though the ASP.NET application runs as a 32-bit process and requires the 32-bit ODP.NET, IIS is a 64-bit process and causes ODP.NET to access the 64-bit registry keys. You didn't mention whether you were trying to setup Oracle for ASP.NET, but I'll share my fix (although it is for the Oracle 10.2 install).
我遇到的问题是我有一个安装了 32 位 Oracle ODP.NET 驱动程序的 32 位 ASP.NET 应用程序。我不知道,即使 ASP.NET 应用程序作为 32 位进程运行并需要 32 位 ODP.NET,IIS 是一个 64 位进程并导致 ODP.NET 访问 64 位注册表键。您没有提到您是否尝试为 ASP.NET 设置 Oracle,但我将分享我的修复程序(尽管它是针对 Oracle 10.2 安装的)。
(I'm copying this verbatim from my blog post)
(我从我的博客文章中逐字复制了这个)
Note: this forces Oracle 11.2.0.1 to use 32-bit only in a 64-bit environment.
注意:这会强制 Oracle 11.2.0.1 仅在 64 位环境中使用 32 位。
The first mistake I made was to install the Oracle 10g client on Windows 7. This WILL NOT work. If you install it, you will have to perform some cleanup afterward.
我犯的第一个错误是在 Windows 7 上安装 Oracle 10g 客户端。这是行不通的。如果你安装它,你必须在之后执行一些清理工作。
- Go to Oracle's site and download/install the 11g 32-bit and 64-bit clients.
- Go hereand follow the "Dummy registry entry" steps.
- Open regedit and verify that
HKLM\SOFTWARE\Wow6432Node\ORACLE\inst_locpoints to the proper location (probably C:\oracle\Inventory) - Point the registry entry at
HKLM\SOFTWARE\Wow6432Node\ORACLE\VOBHOME2.0to the 32-bit Oracle folder - Create an
ORACLE_HOMEenvironment variable and point it to the 32-bit folder.
- 转到 Oracle 站点并下载/安装 11g 32 位和 64 位客户端。
- 转到此处并按照“虚拟注册表项”步骤操作。
- 打开 regedit 并验证
HKLM\SOFTWARE\Wow6432Node\ORACLE\inst_loc指向正确的位置(可能是 C:\oracle\Inventory) - 将注册表项
HKLM\SOFTWARE\Wow6432Node\ORACLE\VOBHOME2.0指向 32 位 Oracle 文件夹 - 创建一个
ORACLE_HOME环境变量并将其指向 32 位文件夹。
Now you should be all set after a restart.
现在您应该在重新启动后一切就绪。
If you tried installing the Oracle 10g client, you'll have to perform some cleanup. First, make sure Oracle 10g is completely uninstalled, dereferenced from your PATH variable, and the directory is removed. Then, find the assemblies referenced in the GAC:
如果您尝试安装 Oracle 10g 客户端,则必须执行一些清理工作。首先,确保完全卸载 Oracle 10g,从 PATH 变量中取消引用,并删除该目录。然后,找到 GAC 中引用的程序集:
gacutil /l | find /i "Oracle" > c:\[some directory]\oracle.txt
Find the lines referring to Oracle.DataAccess version 10.2 and remove them from the GAC. As an example (this won't work unless you have the same version installed):
找到引用 Oracle.DataAccess 版本 10.2 的行并将它们从 GAC 中删除。例如(除非您安装了相同的版本,否则这将不起作用):
gacutil /u "Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342"
When I did this, I had three assemblies to remove:
当我这样做时,我需要移除三个组件:
- Oracle.DataAccess
- Policy.10.1.Oracle.DataAccess
- Policy.9.2.Oracle.DataAccess
- Oracle.DataAccess
- Policy.10.1.Oracle.DataAccess
- Policy.9.2.Oracle.DataAccess
Again, you'll probably need to restart (hey, it's Windows).
同样,您可能需要重新启动(嘿,它是 Windows)。
If you need to perform any cleanup, I've also blogged about that
如果您需要执行任何清理工作,我也在博客上写过相关内容
For reference
In case the link to the "Dummy registry entry" steps dies, here's the text from that post by Gadi:
供参考
如果指向“虚拟注册表项”步骤的链接失效,以下是 Gadi 帖子中的文本:
"" Hi Ben,
”“嗨,本,
At design time, when working with the SQL Server Business Intelligence Development Studio, the Oracle Connector is running in 32-bit mode and therefore it loads the 32-bit Oracle client.
在设计时,使用 SQL Server Business Intelligence Development Studio 时,Oracle Connector 以 32 位模式运行,因此它加载 32 位 Oracle 客户端。
Most likelly, you are getting the error because the connector is loading the wrong Oracle client (oci.dll), where the TNS service is not defined.
最有可能的是,您收到错误是因为连接器加载了错误的 Oracle 客户端 (oci.dll),其中未定义 TNS 服务。
To solve the problem, you have two options:
要解决此问题,您有两种选择:
Specify the Oracle connection string, instead of the TNS service name in the Oracle Connection Manager Editor, for example, in the following format:
host:port/service_nameDefine a dummy registry entry (
Z_SSIS) as follows:- Open the regedit utility.
- Locate the following Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE. - Right-Click on ORACLE node and click on New -> Key.
- Call the new key
Z_SSIS(to make sure it's the last entry). - Right-Click on the
Z_SSISnode and click on New -> String. - Name the property
ORACLE_HOME. - Double-Click on the
ORACLE_HOMEand set it to the location of the Oracle 32Bit installation home directory you whant to use.
在 Oracle 连接管理器编辑器中指定 Oracle 连接字符串,而不是 TNS 服务名称,例如,采用以下格式:
host:port/service_name定义一个虚拟注册表项 (
Z_SSIS) 如下:- 打开 regedit 实用程序。
- 找到以下键:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE。 - 右键单击 ORACLE 节点并单击 New -> Key。
- 调用新密钥
Z_SSIS(以确保它是最后一个条目)。 - 右键单击该
Z_SSIS节点,然后单击新建 -> 字符串。 - 命名该属性
ORACLE_HOME。 - 双击
ORACLE_HOME并将其设置为您要使用的 Oracle 32Bit 安装主目录的位置。
Regards,
问候,
Gadi ""
加迪“”
回答by one.beat.consumer
The simplest way to explain the issue is to point out the difference between the Oracle Client and the ODAC client libraries.
解释该问题的最简单方法是指出 Oracle 客户端和 ODAC 客户端库之间的区别。
On a 64-bit machine (Windows 7+), you need to have installed the 64-bit Oracle Client. This is the client your machine will use to connect to Oracle databases that are deployed locally on your machine. For apps hosted on a web server or other terminal server, the rule is the same.
在 64 位计算机(Windows 7+)上,您需要安装 64 位 Oracle 客户端。这是您的机器将用于连接到在您的机器上本地部署的 Oracle 数据库的客户端。对于托管在 Web 服务器或其他终端服务器上的应用程序,规则是相同的。
The trick is this... as a developer, our machines must also have the .Net IDE tooling. Oracle has a crappy naming convention but essentially there are 2 pieces: ODT (tooling) and ODAC (data access). The ODP.Net data provider is a part of the ODAC libraries.
诀窍是……作为开发人员,我们的机器还必须具有 .Net IDE 工具。Oracle 有一个蹩脚的命名约定,但本质上有两个部分:ODT(工具)和 ODAC(数据访问)。ODP.Net 数据提供程序是 ODAC 库的一部分。
So... back to the IDE... Visual Studio is 32-bit and therefore we must install the tooling above in 32-bit.
所以……回到 IDE……Visual Studio 是 32 位的,因此我们必须在 32 位中安装上面的工具。
While developing, debugging, etc. VS.Net is using the 32-bit client libraries and data access libraries to work with Oracle.
在开发、调试等过程中,VS.Net 使用 32 位客户端库和数据访问库与 Oracle 一起工作。
As soon as you deploy this application to a machine, it uses whatever Client is loaded on the machine unless a specific platform is targeted.
只要您将此应用程序部署到机器上,它就会使用机器上加载的任何客户端,除非针对特定平台。
This means if you target 32 and deploy to 64, it will break... and vice versa. The best thing to do is leave it on the any platform section, and simply remember what the hell you are doing :)
这意味着如果你的目标是 32 并部署到 64,它就会崩溃……反之亦然。最好的办法是把它留在任何平台部分,只需记住你到底在做什么:)
The other thing to be careful with is to ensure both your Client and ODAC packages are of the same version... you do not want to have 11g R2 client, and 11g R5 ODAC, because as soon as you deploy, crap breaks again.
另一件需要注意的事情是确保您的客户端和 ODAC 软件包的版本相同……您不希望拥有 11g R2 客户端和 11g R5 ODAC,因为一旦部署,废话就会再次出现。
The caveat here is if you wish to "embed" the oracle client inside your application, in which case OraOps alongside several other libraries are deployed with the application - this is called Oracle's Instant Client, and is also a part of the ODAC package and included in their full blown Client package as well.
这里需要注意的是,如果您希望将 oracle 客户端“嵌入”到您的应用程序中,在这种情况下,OraOps 与其他几个库与应用程序一起部署 - 这称为 Oracle 即时客户端,也是 ODAC 包的一部分并包含在内在他们完整的客户端包中。
The good news...
好消息...
Oracle is soon (2013 Q1) to release their next ODP.Net package... which will be a fully managed-code library... meaning no more separate client or ODAC package to match up, and the platform will be ignorant of 32 and 64 bit distinctions... it will function much like the old microsoft library will, only it will be built and maintained by oracle with a more robust feature set. I only wish it would arrive sooner.
Oracle 很快(2013 年第一季度)将发布他们的下一个 ODP.Net 包......这将是一个完全托管的代码库......意味着不再需要单独的客户端或 ODAC 包来匹配,并且平台将不知道 32和 64 位的区别……它的功能很像旧的 microsoft 库,只是它由 oracle 构建和维护,具有更强大的功能集。我只希望它早点到达。
回答by user3207744
I have had the same problem and found that running the unconfigure and configure bat files in the copy version of the Oracle.DataAccess.dll 11.x software install may solve or help solve the problem.
我也遇到了同样的问题,发现在复制版的Oracle.DataAccess.dll 11.x软件安装中运行unconfigure和configure bat文件可以解决或帮助解决问题。
E.G. configure.bat xxx.netx xxx\product\11.2.0\client_1
EG configure.bat xxx.netx xxx\product\11.2.0\client_1

