未找到oracle 客户端和网络组件"问题详

本文介绍了解决在使用Oracle 9.2客户端软件与IIS结合时出现的连接错误的方法。该错误通常发生在安装了Oracle 9.2的NTFS格式分区系统上,涉及对ORACLE_HOME目录权限进行调整。

http://blog.youkuaiyun.com/hongyihua/article/details/2347025

   今天在测试ASP.NET程序,在连接ORACLE数据库时报出了“Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed”的错误。可我本机上确确实实已经装了Oracle Client,而且在我本机上运行时也正常,一旦通过IIS发布,在运行时就会报上述错误。通过查找网络资料,该问题已经成功解决。现将解决过程发布,供大家参考。

      首先,把可能出现该问题的情况简单阐述一下:a:Oracle 9.02i 版的问题b:是NTFS格式分区造成的。Oracle公司对此问题也给出了描述:Problem Description ------------------- When running an application that connects to Oracle and uses the Authenticated User privilege (such as Microsoft’s Internet Information Server (IIS)) via Oracle’s 9.2 client software and any of these programmatic interfaces 1. Oracle Provider for OLE DB  2. Microsoft OLE DB Provider for Oracle  3. Oracle ODBC Driver  4. Microsoft ODBC for Oracle  5. Oracle Objects for OLE (OO4O)  you will receive one of the following errors:  (1) Oracle Provider for OLE DB Error Type: Microsoft OLE DB Service Components (0x80070005) Access is denied.  (2) Microsoft OLE DB Provider for Oracle Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. Or Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle error occurred, but error message could not be retrieved from Oracle.  (3) Oracle ODBC Driver Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Specified driver could not be loaded due to system error 5 (Oracle in OraHome92).  (4) Microsoft ODBC for Oracle The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation. You will be unable to use this driver until these components have been installed.  (5) Oracle Objects for OLE (a) while using a GLOBAL.ASA file Error Type: Active Server Pages (0x0) An error occurred while creating object ’OraSession’. (b) not using a GLOBAL.ASA file Error Type: Microsoft VBScript runtime (0x800A0046)Permission denied: ’CreateObject’ (6) Other miscellaneous errors (a) The Specified Module Could Not Be Found

        接着,我们来解决此问题,方法很简单,找到ORACLE_HOME文件夹,右击—〉属性—〉安全,选Authenticated Users,查看它的属性,将Read and Execute的勾先去掉(默认情况下该勾是选中的),在勾上,然后重新启动你的机器,在运行程序,该问题就成功解决了。ORACLE公司也给出了解决方案:Solution Description -------------------- You need to give the Authenticated User privilege to the Oracle Home by following these steps: 1. Log on to Windows as a user with Administrator privileges. 2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME directory. 3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear. 4. Click on the "Security" tab on the "Properties" window. 5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names"). 6. Uncheck the "Read and Execute" box in the "Permissions" list (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users"). This box will be under the "Allow" column. 7. Check the "Read and Execute" box. This is the box you just unchecked. 8. Click the "Apply" button. 9. Click the "OK" button. 10. You may need to reboot your computer after these changes have been made. Re-execute the application and it should now work. Explanation ----------- If you install Oracle9i Release 2 (9.2.0.1) on a computer running Windows with an NTFS partition, the contents of ORACLE_HOME directory will not be visible to users who are authenticated on that machine. These permissions were not set properly when the software was installed. Applications that were working fine with previous versions of Oracle software will stop working when they upgrade to Oracle 9.2. NOTE: The application will continue to work if the user has logged onto the machine as an Administrator. Any application that is using the Authenticated User privilege will not work. A notable example would be IIS which might service some of the requests based on the Authenticated User privileges. To demonstrate the problem in further detail, you can log on to the operating system as an authenticated machine user. You won’t be able browse the contents of the ORACLE_HOME directory demonstrating your inability to load any Oracle DLLs or make a connection. References ---------- Bug:2498880 - Oracle 9I Release 2 Installation Issue on Windows 2000 NTFS File System Additional Search Words ----------------------- OLEDB

         需要注意的是:在XP系统下,属性中可能找不到安全选项卡,如何去解决呢?很简单,打开一个窗体,选择“工具”—〉文件夹选项...—〉查看,将使用简单文件共享前的勾去掉,确认即可(如下图)。

 

<think> 嗯,用户遇到了Oracle客户端组件缺失的错误提示,需要解决方案。从引用内容看,这个问题在64位系统上尤其常见,用户可能已经尝试过网上常见的权限调整方法但无效。 用户引用的三个资料都指向了关键点:64位系统需要特殊处理。引用1提到用32位即时客户端解压到D盘并设置PATH;引用2证实了32位客户端在虚拟机环境下也适用;引用3则强调了同时安装32位64位客户端的必要性。这些信息高度一致说明核心矛盾在于系统位数兼容性。 注意到用户上次对话中强调过“系统级指令”,这次回复需要严格遵循:所有技术术语如PATH、tnsnames.ora都要用$包裹,操作步骤要分段清晰。同时要生成相关问题——可以围绕客户端类型选择配置验证展开。 用户身份推测是开发人员或运维工程师,正在部署依赖Oracle的应用程序。ta可能已经反复尝试过权限修复(无效),现在处于焦虑状态,需要直接可操作的方案。情绪关键词是“研究了两天”“卸载干净”等,说明有较强技术能力但被兼容性问题困扰。 回复结构应该优先给出经过验证的解决方案(32位即时客户端方案),然后补充替代方案(双客户端安装)。引用标识要自然融入步骤说明中,比如PATH设置部分标注[^1]。最后三个相关问题要覆盖客户端选择、配置验证权限调整等维度,帮助用户全面排查。 </think> 以下是解决“未找到 Oracle 客户端网络组件问题的系统性方法,综合引用信息实践经验整理: --- ### **核心解决方案** #### 1. **32 位客户端兼容性处理(64 位系统必选)** - **适用场景**:64 位 Windows 运行 32 位应用程序(如旧版 .NET 程序、SSIS 包等)[^1][^2][^3] - **步骤**: 1. 下载 **Oracle 32 位即时客户端**(如 `instantclient-basic-nt-11.2.0.x.zip`)[^1] 2. 解压到非中文路径(例如 `D:\instantclient_11_2`) 3. 添加解压路径到系统环境变量 `PATH` 的**最前面** 4. 重启应用程序或系统生效 #### 2. **双客户端配置(复杂场景备用)** - **适用场景**:需同时支持 32 位 64 位应用[^3] - **步骤**: 1. 分别安装 **32 位** **64 位** Oracle 客户端 2. 配置独立的 `TNS` 文件: - 32 位客户端目录:`C:\app\client32\product\11.2.0\client_1\network\admin\tnsnames.ora` - 64 位客户端目录:`C:\app\client64\product\11.2.0\client_1\network\admin\tnsnames.ora` 3. 在连接字符串中显式指定 `TNS` 别名(如 `DataSource=orcl_32`),测试连通性[^3] #### 3. **环境变量与权限修正** - **关键变量**(需检查是否存在冲突): - `PATH`:确保 **Oracle 客户端路径优先级高于其他路径** - `ORACLE_HOME`:指向正确的客户端安装目录(如 `D:\instantclient_11_2`) - `TNS_ADMIN`:指定 `tnsnames.ora` 所在目录(若文件不在默认路径) - **权限调整**(仅传统客户端需要)[^1]: - 右键客户端安装目录 → 属性 → 安全 → 添加 `Everyone` 用户 → 赋予**完全控制权限** → 重启系统 --- ### **避坑指南** 1. **卸载冲突版本** - 安装新客户端前,彻底卸载旧版本(使用 Oracle 官方卸载工具)[^2] 2. **位数匹配原则** - 应用程序的**编译平台**(x86/x64)必须与客户端位数一致 - 检查方法:任务管理器 → 进程 → 查看程序是否为 `32 位` 3. **精简客户端优先** - 即时客户端(Instant Client)无需安装,解压配置即可,避免注册表污染[^1] --- ### **验证步骤** ```powershell # 测试客户端连通性(命令行执行) tnsping <TNS别名> # 如 tnsping orcl_32 ``` - 成功响应:`OK (xx ms)` - 失败排查: - 检查 `TNS_ADMIN` 路径是否包含 `tnsnames.ora` - 确认 `PATH` 中 Oracle 路径优先级最高 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值