应用程序无法打开与 Oracle 数据库的连接 - 缺少 DLL OraOps9.dll
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2926371/
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
Application cannot open connection to Oracle database - missing DLL OraOps9.dll
提问by Coxy
My .NET application tries to connect to an Oracle database, but the connection fails to open because it cannot find "OraOps9.dll".
我的 .NET 应用程序尝试连接到 Oracle 数据库,但连接无法打开,因为它找不到“OraOps9.dll”。
xxx.CreatedbConnection() failed to open connection.
System.DllNotFoundException: Unable to load DLL (OraOps9.dll).
at Oracle.DataAccess.Client.OpsTrace.GetRegTraceInfo(UInt32& TrcLevel)
at Oracle.DataAccess.Client.OracleConnection..ctor(String connectionString)
at Utilities.Database.OracleDBConnection.Open()
at xxx.CreatedbConnection(String userName, String password)
The Oracle client is installed but that DLL is not present in my Oracle Home bin\
folder (C:\oracle\ora92\bin\
). Where can I get this DLL?
Oracle 客户端已安装,但该 DLL 不存在于我的 Oracle 主bin\
文件夹 ( C:\oracle\ora92\bin\
) 中。我在哪里可以得到这个 DLL?
回答by Coxy
ODP.NET contains this DLL and is part of a specific client software installer. Presumably the client is available without ODP.NET which is why I had the client installed and working but not that particular DLL.
ODP.NET 包含此 DLL,并且是特定客户端软件安装程序的一部分。据推测,客户端可以在没有 ODP.NET 的情况下使用,这就是为什么我安装了客户端并正常工作,但没有安装那个特定的 DLL。
The client with ODP.NET is available here: http://www.oracle.com/technology/software/tech/windows/odpnet/utilsoft.htmlLink for 9.2 in particular is all the way at the bottom of the page, or direct download link here: http://download.oracle.com/otn/other/ole-oo4o/ODAC92070.exe(80MB)
带有 ODP.NET 的客户端可在此处获得:http: //www.oracle.com/technology/software/tech/windows/odpnet/utilsoft.html特别是 9.2 的链接一直位于页面底部,或者直接下载链接在这里:http: //download.oracle.com/otn/other/ole-oo4o/ODAC92070.exe(80MB)
After downloading and extracting the 80MB client, to save a lengthy reinstall process look for the path:
Disk1\stage\Components\ODP.NET\9.2.0.7.0\1\DataFiles
下载并解压 80MB 客户端后,为了节省冗长的重新安装过程,请查找路径:
Disk1\stage\Components\ODP.NET\9.2.0.7.0\1\DataFiles
Rename OraHomeBin.1.1.jar
to OraHomeBin.1.1.zip
and extract.
Copy the contents to your Oracle Home bin\
directory and run ODPReg.exe
.
Application should now be able to connect fine.
重命名OraHomeBin.1.1.jar
,以OraHomeBin.1.1.zip
和提取。将内容复制到您的 Oracle 主bin\
目录并运行ODPReg.exe
. 应用程序现在应该能够正常连接。
You can run the installer and install only ODP.NET over the top of the client. This fixed lingering connection issues for me even after manually installing/registering the DLL.
您可以运行安装程序并仅在客户端顶部安装 ODP.NET。即使在手动安装/注册 DLL 之后,这也为我解决了挥之不去的连接问题。
回答by ahblur
Need to register an Oracle account first. (Free) Then go to: http://www.oracle.com/technology/software/tech/windows/odpnet/utilsoft.html
需要先注册一个Oracle账号。(免费)然后去:http: //www.oracle.com/technology/software/tech/windows/odpnet/utilsoft.html
Scroll down and look for "Oracle Data Access Components for Windows (ODP.NET, ODBC, OLE, Dev Tools for Visual Studio)" under Drivers
向下滚动并在驱动程序下查找“适用于 Windows 的 Oracle 数据访问组件(ODP.NET、ODBC、OLE、Visual Studio 开发工具)”
Scroll down and look for Oracle9i Release 2 ODAC 9.2.0.7.0
向下滚动并查找 Oracle9i Release 2 ODAC 9.2.0.7.0
Accept License Agreement
接受许可协议