C# 安装安装程序时出现错误 System.Data.OracleClient 需要 Oracle 客户端软件版本 8.1.7 或更高版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19354015/
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
Error System.Data.OracleClient requires Oracle client software version 8.1.7 or greater when installs setup
提问by Volatil3
I have made a desktop app Setup that connects with remote Oracle 10g Database. When I install Setup on remote machine and run my application then I get following error:
我制作了一个与远程 Oracle 10g 数据库连接的桌面应用程序设置。当我在远程机器上安装安装程序并运行我的应用程序时,我收到以下错误:
system.data.oracleclient requires oracle client software version 8.1.7 or greater
It works well on my Development machine.
它在我的开发机器上运行良好。
采纳答案by nvoigt
The error message is pretty self-explanatory: your application needs the Oracle Client installed on the machine it's running on. Your development PC already has it. Make sure your target PC has it, too.
错误消息一目了然:您的应用程序需要在运行它的机器上安装 Oracle 客户端。您的开发 PC 已经拥有它。确保您的目标 PC 也有它。
Edit: The System.Data.OracleClient namespace is deprecated. Make sure you use the driver native to your database system, that would be ODP.NET from Oracle.
编辑:不推荐使用 System.Data.OracleClient 命名空间。确保您使用数据库系统的本机驱动程序,即Oracle 的 ODP.NET。
回答by Robert Dennis
If you have to use the older client, here is my experience.
如果您必须使用旧客户端,这是我的经验。
We are running a 32bit server so the development machines run the 32bit client. We run the 11.1 install, 11.2 gets the error. Once you have installed the 11.2 version you have to manually delete the files Oracle.Web.dll
and System.Data.OracleClient.dll
from the %windir%\Microsoft.NET\Framework\v2.0.50727
, reinstall 11.1, then register the dlls with gacutil.exe
.
我们正在运行 32 位服务器,因此开发机器运行 32 位客户端。我们运行 11.1 安装,11.2 出现错误。一旦你已经安装了11.2版本,您必须手动删除文件Oracle.Web.dll
和System.Data.OracleClient.dll
从%windir%\Microsoft.NET\Framework\v2.0.50727
,重新安装11.1,然后用注册的dll gacutil.exe
。
This fixed the issue with my systems.
这解决了我的系统的问题。
回答by Javysk
It is a security issue, so to fix it simply do the following:
这是一个安全问题,因此只需执行以下操作即可修复它:
- Go to the Oracle Client folder.
- Right Click on the folder.
- On security Tab, Add "Authenticated Users" and give this account Read & Execute permission.
- Apply this security for all folders, Subfolders and Files (IMPORTANT).
- Don't Forget to REBOOT your Machine; if you forgot to do this you will still face the same problem unless you restart your machine.
- 转到 Oracle 客户端文件夹。
- 右键单击文件夹。
- 在安全选项卡上,添加“经过身份验证的用户”并授予此帐户读取和执行权限。
- 对所有文件夹、子文件夹和文件应用此安全性(重要)。
- 不要忘记重新启动您的机器;如果您忘记这样做,除非您重新启动机器,否则您仍将面临同样的问题。
回答by techExplorer
On your remote machine, System.Data.OracleClientneed access to some of the oracle dll which are not part of .Net. Solutions:
在您的远程机器上,System.Data.OracleClient需要访问一些不属于 .Net 的 oracle dll。解决方案:
- Install Oracle Client , and add bin location to Path environment varaible of windows OR
- Copy oraociicus10.dll (Basic-Lite version) or aociei10.dll (Basic version), oci.dll, orannzsbb10.dll and oraocci10.dll from oracle client installable folder to bin folder of application so that application is able to find required dll
- 安装 Oracle Client ,并将 bin 位置添加到 windows 的 Path 环境变量或
- 将oraociicus10.dll(Basic-Lite版)或aociei10.dll(Basic版)、oci.dll、orannzsbb10.dll和oraocci10.dll从oracle客户端安装文件夹复制到应用程序的bin文件夹中,以便应用程序能够找到所需的dll
On your local machine most probably path to Oracle Client is already added in Path environment variable to there required dll are available to application but not on remote machine
在您的本地机器上,Oracle 客户端的路径很可能已添加到 Path 环境变量中,以便应用程序可以使用所需的 dll,但在远程机器上则无法使用
回答by Abdul Qader Siddiqui
Go to C:\app\insolution\product\11.2.0\client_1\BIN and find oci.dll. Right click on it -->Properties -->Under Security tab, click on Edit -->Then Click on Add Button --> Here add two new users with names IUSR and IIS_IUSRS and give them full controls. That's it.
转到 C:\app\insolution\product\11.2.0\client_1\BIN 并找到 oci.dll。右键单击它 --> 属性 --> 在安全选项卡下,单击编辑 --> 然后单击添加按钮 --> 在此处添加两个名为 IUSR 和 IIS_IUSRS 的新用户并赋予他们完全控制权。就是这样。
回答by Bobby Khan
After installation of Oracle Client 11.02.04, reboot the server and make sure USERS(Local Computer) is added with Full Control on Root folder for eg WWW
安装 Oracle Client 11.02.04 后,重新启动服务器并确保添加了对根文件夹的完全控制的用户(本地计算机),例如 WWW
Tested, it worked.
经测试,有效。