Oracle 11g2的监听器配置教程


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的文件链接。



相关阅读:
C语言中的隐式函数声明
ASP.NET中Ajax怎么使用
JS实现窗口加载时模拟鼠标移动的方法
javascript运动效果实例总结(放大缩小、滑动淡入、滚动)
JsRender for index循环索引用法详解
javascript 闭包详解
jquery插件之文字间歇自动向上滚动效果代码
C#运行时相互关系浅析
Linux查看系统日志的一些常用命令总结
win7升级Win10 TH2正式版后将不能滚回?
css3实现针线缝合效果(图解步骤)
windows 10 10130应用商店闪退怎么办?
Ubuntu安装mac os x主题让你的Ubuntu看起来更像MAC OS X
JavaScript正则表达式验证身份证号码是否合法(两种方法)
快速导航

Copyright © 2016 phpStudy |