需要修改你所安装的数据的路径下 tnsnames.ora 文件(我安装路径是F:appAsideproduct11.2.0dbhome_1NETWORKADMIN)
tnsnames.ora中的内容如下所示:
# tnsnames.ora Network Configuration File: F:appAsideproduct11.2.0dbhome_1
etworkadmin nsnames.ora
# Generated by Oracle configuration tools.
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 = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
你需要复制一份orcl的内容 orcl是你的实例名称你可以随便取,localHost改为你要连接的IP地址,1521 改为你要连接的数据库的端口号,SEVRVICE_NAME=orcl 中的orcl改为你要连接的远程数据的实例的名称。 例如
aside =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.120.110.119)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HolloOracle)
)
)
然后在pl_sql develope中选择你要连接的数据库的实例名输入用户名和密码就好了。