64位操作系统使用Pl/SQL Developer连接数据库
在64位操作系统下安装了PL/SQL Developer,启动时无法找到TNS,登录时提示:
PL/SQL Developer
---------------------------
Initialization error
SQL*Net not properly installed
OracleHomeKey:
OracleHomeDir:
单击Tools->Prefences
找到Connection发现Oracle Home和OCI libaray是空的,手动设置后重新登录提示:
PL/SQL Developer
---------------------------
Initialization error
Could not load
"D:\app\Administrator\product\11.2.0\dbhome_1\BIN\oci.dll"
OCIDLL forced to
D:\app\Administrator\product\11.2.0\dbhome_1\BIN\oci.dll
LoadLibrary(D:\app\Administrator\product\11.2.0\dbhome_1\BIN\oci.dll)
returned 0
原因是PL/SQL Developer 无法支持64位,这时候需要安装一个32位的Oracle客户端做为一个代理。
1.下载32位Oracle客户端下载地址如下:
http://www.oracle.com/technetwork/topics/winsoft-085727.html
下载需要一个帐号,如果没有需要先免费申请一个。
2.里面有很多版本,建议下载和自己服务器同一个版本的,用sqlplus登录就会看到你的版本号:
C:\>sqlplus scott/tiger SQL*Plus: Release 11.2.0.1.0 Production on 星期日 1月 12 20:42:59 2014 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
我的是11.2.0.1.0
3.将下载文件解压到你的磁盘下,我的解压到了D盘下的Client文件夹下。
4.将服务器端的NETWORK这个文件夹拷贝到你客户端的根目录下。
NETWORK目录所在的路径是:D:\app\Administrator\product\11.2.0\dbhome_1
5.重新设置PL/SQL Devdelper的Oracle Home和OCI libaray
主要是重新设置OCI这次使用的是客户端的oci.dll也就是32位的。
6.退出重新连接
连接成功