2.tsname.ora配置:
orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.60)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
safe =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.43.34)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SMS)
)
)
orcl:连接名称(任意名称);
host:服务器IP地址,当服务器为本机时可以写localhost,端口一般是默认的1521;
DEDICATED:服务模式为专用,也有shared选项,具体区别为:
如果你的数据库配置不是MTS,那所有的连接都是DEDICATED,如果你的数据库配置是MTS,不指定DEDICATED,就是SHARED模式:意味着为你这个客户端服务的server进程和为其他客户端服务的server进程是共享的。
DEDICATED:意味着你这个客户端锁对应服务的server进程只为你这个客户端服务。
SERVICE_NAME:要连接的实际的数据库名称
3.PL/SQL Developer首选项的配置:
4.启动文件(start.bat) 配置:
@echo off
set path=D:SDKPLSQLinstantclient_11_2
set ORACLE_HOME=D:SDKPLSQLinstantclient_11_2
set TNS_ADMIN=D:SDKPLSQLinstantclient_11_2
set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
start plsqldev.exe