64位环境下,使用PL/SQL Developer连接Oracle:
•1. 下载32位Oracle InstantClient,并展开到某目录,例如C:\instantclient-basic-nt-11.2.0.2.0;
•2. 将系统的tnsnames.ora拷贝到该目录下;
•3. 在PLSQL Developer中设置Oracle_Home和OCI Library:
Tools>Preferences>Oracle>Connection:Oracle_Home: C:\instantclient-basic-nt-11.2.0.2.0
OCI Library: C:\instantclient-basic-nt-11.2.0.2.0\oci.dll
•4.两种方式,第一种(修改环境变量)
path中添加C:\instantclient-basic-nt-11.2.0.2.0
新建ORACLE_HOME=C:\instantclient-basic-nt-11.2.0.2.0
TNS_ADMIN=C:\instantclient-basic-nt-11.2.0.2.0
NLS_LANG=AMERICAN_AMERICA.ZHS16GBKstart plsqldev.exe
注:如果安装时间选择数据库字符集为UTF-8则NLS_LANG=AMERICAN_AMERICA.AL32UTF8
第二种(创建bat,在启动时间通过bat文件设置环境变量)
在PLSQL Developer目录下新建如下bat文件,替换其快捷方式,启动PLSQL Developer:
@echo offset path=C:\instantclient-basic-nt-11.2.0.2.0
set ORACLE_HOME=C:\instantclient-basic-nt-11.2.0.2.0
set TNS_ADMIN=C:\instantclient-basic-nt-11.2.0.2.0
set NLS_LANG=AMERICAN_AMERICA.ZHS16GBKstart plsqldev.exe
注:如果安装时间选择数据库字符集为UTF-8则set NLS_LANG=AMERICAN_AMERICA.AL32UTF8