1.首先要确定电脑上面安装了,plsql-Developer客户端,然后将instantclient-basic-nt-11.2.0.3.0.zip文件解压后(附:下载地址为http://download.csdn.net/detail/aaronsihai/9795379)打开文件夹instantclient_11_2显示如下图:
2.窗体顶端这时候打开plsql-Developer客户端,接着打开上面工具栏中的Tools Preferences如图所示:
其中Oracle Home就是刚才解压的文件路径,copy进去就行,下面的OCL Libray框中需要手动添加oci.dll然后点击Apply
3.在instantclient_11_2目录下新建NETWORK\ADMIN文件夹,在ADMIN文件夹下创建tnsnames.ora文件。
4.打开instantclient_11_2\NETWORK\ADMIN中的tnsnames.ora文件,然后将配置好的代码copy到文件中
#tnsnames.ora Network Configuration File:D:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
#Generated by Oracle configuration tools.
ORACLE=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.196.218)(PORT = 1521))
---------注意红色部分需要更换成自己的oraclei的IP地址
)
(CONNECT_DATA =
(SERVICE_NAME = oracle)
)
)
LISTENER_ORCL=
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY =EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
红色字体是需要改动的地方。设置环境变量,点击我的电脑--〉属性--〉高级-〉环境变量,增加:NLS_LANG=SIMPLIFIEDCHINESE_CHINA.ZHS16GBK
ZHS16GBK 与自己的数据库编码一致。
5.最后把plsql-Developer客户端关闭,再重新打开就能看见连接的下拉列表了。
文中所用文件下载地址为:http://download.csdn.net/detail/aaronsihai/9795379
以上安装方式如果不甚明白,也可以参考《免安装oracle配置说明.wps》和http://jingyan.baidu.com/article/48b558e3540ecf7f38c09a3c.html配合安装效果更佳。