首页 > 数据库技术 > 详细

plsql初次连接oracle报错解决方案

时间:2019-06-22 16:21:49      阅读:266      评论:0      收藏:0      [点我收藏+]

windows7 64bit

Oracle win64 11gR2(两个文件)

PL/SQL v9.0

详细错误信息

[plain] view plain copy
 
 
 

Initialization error  

Could not initialize "C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll"  

Make sure you have the 32 bits Oracle Client installed.  

OCIDLL forced to C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll  

LoadLibrary(C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll) returned 0  

问题原因

安装完后Oracle的 oci.dll 是64位的,而32位应用程序 PLSQL Developer 无法加载。

解决方案

1. 从 http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html 下载Oracle Client Package。 我下载的是Instant Client for Microsoft Windows (32-bit) 【instantclient-basic-nt-11.2.0.2.0.zip】 
2. 将 instantclient-basic-nt-11.2.0.2.0.zip 解压至oracle安装目录下 E:\oracle\installdir\product, 
3. 设置环境变量
    TNS_ADMIN=E:\oracle\installdir\product\11.2.0\dbhome_1\NETWORK\ADMIN
    NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (注:NLS_LANG前半部分必须是AMERICAN_AMERICA,因为instant client不支持其他语言;而后半部分可以根据你数据库的字符集调整,如果数据库采用AL32UTF8,则可以设置AL32UTF8)
4. 启动PL/SQL Developer ,点击“取消”不要登录,菜单 --> Tools --> Perferences --> Connection 修改 Oracle_Home 和 OCI Library 的配置:
    OracleHome: OraDb11g_home1
    OCI library: E:\oracle\installdir\product\instantclient_11_2\oci.dll

plsql初次连接oracle报错解决方案

原文:https://www.cnblogs.com/qinyios/p/11069180.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!