1.去oracle官网下载Instant Client
地址:http://www.oracle.com/technetwork/cn/topics/winsoft-095945-zhs.html
?
2.解压下载完成的压缩包
我解压到了D:\Oracle\oraclient目录下
3.添加tnsnames.ora文件到D:\Oracle\oraclient目录下
tnsnames.ora文件中要做如下配置
ORCL_172.30.12.166 =
? (DESCRIPTION =
??? (ADDRESS_LIST =
????? (ADDRESS = (PROTOCOL = TCP)(HOST = 172.30.12.166)(PORT = 1521))
??? )
??? (CONNECT_DATA =
????? (SERVICE_NAME = ORCL)
??? )
? )
4.配置相应的环境变量
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK (指定客户端字符集,否则会乱码)
TNS_ADMIN=D:\Oracle\oraclient? (指定tnsnames.ora文件所在目录)
path中加入D:\Oracle\oraclient?
?
5.设置plsql的首选项
工具->首选项->连接?
oracle主目录=D:\Oracle\oraclient
oracle库??=D:\Oracle\oraclient\oci.dll?
配置完成后重启plsql,大功告成。
?