Oracle 11g2的监听器配置教程
更新时间:2012年11月30日 09:08:05 作者:
Oracle的监听器服务注册方式有两种,分别为动态和静态,本文将详细介绍这两种,需要的朋友可以参考下
Oracle的监听器服务注册方式有两种,分别为动态和静态。通过动态注册的服务在lsnrctl status时显示的状态为ready,静态的服务为unknown。
11g2以前的版本,监听器通过listener.ora文件进行配置。在11g2版本中,监听器的配置方式发生了变化,增加了一个新的配置文件endpoints_listener.ora,并且此文件和原来的listener.ora文件都转移到$GRID_HOME/network/admin目录下了。
11g2的监听器的配置信息保存在$GRID_HOME/network/admin/listener.ora和endpoints_listener.ora两个文件中。
文件endpoints_listener.ora的内容如下:
.ora代码
LISTENER_SERV2=
(DESCRIPTION=
(
ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=xxdb2-vip)(PORT=1551))
(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10.100)(PORT=1551)(IP=FIRST))
)
)
文件listener.ora的内容如下:
.ora代码
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_WFG=ON # line added by Agent
.ora代码
##静态服务注册添加条目
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = servdb)
(ORACLE_HOME = /u01/oracle/app/oracle/product/10.2.0/db)
(SID_NAME = servdb1)
)
)
如果需要添加静态注册的服务,和以前版本一样是在listener.ora文件中添加相应的条目。
使用lsnrctl status listener检查监听器状态,如下:
Log代码
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-NOV-2012 14:18:34
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 29-NOV-2012 14:11:17
Uptime 0 days 0 hr. 7 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0.3/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/serv2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.100)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.101)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "SERVDG2" has 1 instance(s).
Instance "servdb1", status READY, has 1 handler(s) for this service...
Service "SERVDG2_XPT" has 1 instance(s).
Instance "servdb1", status READY, has 1 handler(s) for this service...
Service "elvdb" has 2 instance(s).
Instance "elvdb1", status UNKNOWN, has 1 handler(s) for this service...
Instance "elvdb2", status READY, has 1 handler(s) for this service...
Service "elvdbXDB" has 1 instance(s).
Instance "elvdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
在11g2的grid infrastructure上安装oracle 10g,10g的监听器配置文件也要采用$GRID_HOME/network/admin下的文件。
但需要做一个折中操作,将10g的$ORACLE_HOME/network/admin下listener.ora文件设置为$GRID_HOME/network/admin下endpoints_listener.ora的文件链接。
11g2以前的版本,监听器通过listener.ora文件进行配置。在11g2版本中,监听器的配置方式发生了变化,增加了一个新的配置文件endpoints_listener.ora,并且此文件和原来的listener.ora文件都转移到$GRID_HOME/network/admin目录下了。
11g2的监听器的配置信息保存在$GRID_HOME/network/admin/listener.ora和endpoints_listener.ora两个文件中。
文件endpoints_listener.ora的内容如下:
.ora代码
复制代码 代码如下:
LISTENER_SERV2=
(DESCRIPTION=
(
ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=xxdb2-vip)(PORT=1551))
(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10.100)(PORT=1551)(IP=FIRST))
)
)
文件listener.ora的内容如下:
.ora代码
复制代码 代码如下:
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_WFG=ON # line added by Agent
.ora代码
##静态服务注册添加条目
复制代码 代码如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = servdb)
(ORACLE_HOME = /u01/oracle/app/oracle/product/10.2.0/db)
(SID_NAME = servdb1)
)
)
如果需要添加静态注册的服务,和以前版本一样是在listener.ora文件中添加相应的条目。
使用lsnrctl status listener检查监听器状态,如下:
Log代码
复制代码 代码如下:
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-NOV-2012 14:18:34
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 29-NOV-2012 14:11:17
Uptime 0 days 0 hr. 7 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0.3/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/serv2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.100)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.101)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "SERVDG2" has 1 instance(s).
Instance "servdb1", status READY, has 1 handler(s) for this service...
Service "SERVDG2_XPT" has 1 instance(s).
Instance "servdb1", status READY, has 1 handler(s) for this service...
Service "elvdb" has 2 instance(s).
Instance "elvdb1", status UNKNOWN, has 1 handler(s) for this service...
Instance "elvdb2", status READY, has 1 handler(s) for this service...
Service "elvdbXDB" has 1 instance(s).
Instance "elvdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
在11g2的grid infrastructure上安装oracle 10g,10g的监听器配置文件也要采用$GRID_HOME/network/admin下的文件。
但需要做一个折中操作,将10g的$ORACLE_HOME/network/admin下listener.ora文件设置为$GRID_HOME/network/admin下endpoints_listener.ora的文件链接。
相关文章
oracle sql语言模糊查询--通配符like的使用教程详解
这篇文章主要介绍了oracle sql语言模糊查询--通配符like的使用教程详解,非常不错,具有参考借鉴价值,需要的朋友参考下吧2018-04-04在Spring中用select last_insert_id()时遇到问题
一直使用的Oracle数据库,通过序列来实现自增字段,插入之前就已经获得了自增id,保存下来即可在后来的操作中使用2009-05-05Window下Oracle Database 11g 发行版2安装教程
这篇文章主要为大家详细介绍了Window下Oracle Database 11g 发行版2安装教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2018-07-07基于ora2pg迁移Oracle19C到postgreSQL14的全过程
ora2pg是一个开源工具,可将Oracle数据库模式转换为PostgreSQL格式,支持导出数据库绝大多数对象类型,本文就给大家介绍了基于ora2pg迁移Oracle19C到postgreSQL14的全过程,文中有详细的代码示例,需要的朋友可以参考下2023-11-11
最新评论