oracle监听配置多个端口的方法

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:49

oracle 监听配置多个端口

oracle监听可以配置多个端口,满足不同的客户端应用
以下是配置和测试步骤
listener.ora 配置
# LISTENER.ORA Network Configuration File: D:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = yi)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = yi)(PORT = 1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = yi)(PORT = 1528))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = test)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = test)
)
)
红色部分为新增加的端口
C:\Documents and Settings\yi>lsnrctl stop
LSNRCTL for 32-bit Windows: Version 9.2.0.8.0 - Production on 31-10月-2008 21:02
:43
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yi)(PORT=1521)))
命令执行成功
C:\Documents and Settings\yi>lsnrctl start
LSNRCTL for 32-bit Windows: Version 9.2.0.8.0 - Production on 31-10月-2008 21:02
:46
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
启动tnslsnr:请稍候...
TNSLSNR for 32-bit Windows: Version 9.2.0.8.0 - Production
系统参数文件为D:\oracle\ora92\network\admin\listener.ora
写入D:\oracle\ora92\network\log\listener.log的日志信息
监听:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yi)(PORT=1521)))
监听:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yi)(PORT=1526)))
监听:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yi)(PORT=1528)))
监听:(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yi)(PORT=1521)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 9.2.0.8.0 - Produc
tion
启动日期 31-10月-2008 21:02:46
正常运行时间 0 天 0 小时 0 分 0 秒
跟踪级别 off
安全性 OFF
SNMP OFF
监听器参数文件 D:\oracle\ora92\network\admin\listener.ora
监听器日志文件 D:\oracle\ora92\network\log\listener.log
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yi)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yi)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yi)(PORT=1528)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
服务摘要..
服务 "PLSExtProc" 包含 1 个例程。
例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "test" 包含 1 个例程。
例程 "test", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功
C:\Documents and Settings\yi>

tnsnames.ora 配置
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = yi)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
TEST26 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = yi)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
TEST28 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = yi)(PORT = 1528))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
tnsping 测试
C:\Documents and Settings\yi>tnsping test
TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 31-10月-2
008 21:04:25
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora92\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = yi)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME
= test)))
OK(30毫秒)
C:\Documents and Settings\yibin>tnsping test26
TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 31-10月-2
008 21:04:33
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora92\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = yibin)(PORT = 1526))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME
= test)))
OK(30毫秒)
C:\Documents and Settings\yibin>tnsping test28
TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 31-10月-2
008 21:04:36
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora92\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = yibin)(PORT = 1528))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME
= test)))
OK(30毫秒)
C:\Documents and Settings\yibin>

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】