windows7 下安装64位oracle用PL/SQL Developer连接报错问题

PLSQL Developer 连接Oracle X64版。 报错如下:

  1. [Window Title]
  2. (Not logged on)
  3. [Content]
  4. Initialization error
  5. Could not initialize "C:\oracle\product\10.2.0\client_1\bin\oci.dll"
  6. Make sure you have the 32 bits Oracle Client installed.
  7. OracleHomeKey:
  8. OracleHomeDir: C:\oracle\product\10.2.0\client_1
  9. Found: oci.dll
  10. Using: C:\oracle\product\10.2.0\client_1\bin\oci.dll
  11. LoadLibrary(C:\oracle\product\10.2.0\client_1\bin\oci.dll) returned 0

原因:因为PLSQL developer 没有支持64位的版本

解决方法:

1.下载oracle提供的32 bit client,下载地址:http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html?ssSourceSiteId=ocomen

下载完成后解压随意目录:如:D:\instantclient_11_2

2.启动PL/SQL→Tools→Preferences→Oracle→Connection,设置Oracle Home和OCI Library

Oracle Home ------D:\instantclient_11_2

OCI Library--------D:\instantclient_11_2\ocl.dll

3.对系统的环境变量进行配置

主要需要以下两项:

变量名:TNS_ADMIN.

变量值:Oracle安装目录中的 ....../product/11.2.0/dbhome_1/NETWORK/ADMIN.

变量名:NLS_LANG.

变量值:AMERICAN_AMERICA(数据库字符编码 ).

(另外以下是安装Oracle就需要配置的,否则可能会有TNS协议适配器错误)

变量名:oracle_sid

变量值:Oracle的数据库实例

其中数据库字符编码可以通过进入SQL PLUS   select userenv(‘language’) from dual;来查询。

这样重新启动一下PLSQL Developer,然后就能访问了。

原文地址:https://www.cnblogs.com/gugnv/p/2335090.html