客户端:WIN10
服务器:在Linux安装的Oracle服务器
1、下载plsqldeveloper11.zip、instantclient_11_2.rar 并解压到相应的目录
D:\instantclient_11_2 、D:\PLSQL Developer
2、在WIN10上添加环境变量
变量名:TNS_ADMIN 变量值:D:\instantclient_11_2\NETWORK\ADMIN
变量名:NLS_LANG 变量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK
变量TNS_ADMIN为tnsnames.ora文件所在目录
3、将oracle服务器上的文件/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
传到D:\instantclient_11_2\NETWORK\ADMIN目录上。WIN10能ping通oracle服务器oracle11g01。
tnsnames.ora文件内容为:
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle11g01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
4、设置PLSQL Developer:Tools->Preferences->Connection
5、重新登陆