首页 > Linux操作系统 > Linux操作系统 > 多listener 端口的问题
listener.ora文件:
# listener.ora Network Configuration File: d:oracleproduct10.1.0NETWORKADMINlistener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = test)
(ORACLE_HOME = D:oracleproduct10.1.0)
(SID_NAME = test)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 3000))
)
)
tnsnames.ora中的配置:
test1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
test2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 3000))
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
连接测试:
D:>sqlplus test/test@test1
SQL*Plus: Release 9.2.0.1.0 - Production on 星期日 1月 30 18:44:06 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
从Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options中断开
D:>sqlplus test/test@test2
SQL*Plus: Release 9.2.0.1.0 - Production on 星期日 1月 30 18:44:41 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/6906/viewspace-21713/,如需转载,请注明出处,否则将追究法律责任。