pl/sql连接远程服务器
1.oracle提供了instantclient,下载instantclient-basic-win32-10.2.0.4.zip,将包解压存放到本地,如:D:\STUDY\instantclient_10_2。
下载地址:http://pan.baidu.com/s/1hqxGmKs
2.在该目录下,新建sqlnet.ora和tnsnames.ora两个文件:
sqlnet.ora:
SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora:
orcl = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.146.143 )(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = orcl ) ) )
3.配置环境变量:
变量名 变量值
TNS_ADMIN D:\STUDY\instantclient_10_2
4.打开PL/SQL,Tools-->Preferences,配置Connection的Oracle Home和OCI library,如下图所示
6.重新启动PL/SQL,登录,OK!
如果pl/sql出现乱码,请参考:http://www.cnblogs.com/myCodingSky/p/3681931.html