local_listener參数有两种书写格式,提供了不同的功能。

监听文件上,1521和1526port上都有动态监听port。

[oracle@dbsv admin]$ cat listener.ora
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=PROD)
(ORACLE_HOME=/u01/oracle)
(SID_NAME=PROD))
(SID_DESC=
(GLOBAL_DBNAME=EMREP)
(ORACLE_HOME=/u01/oracle)
(SID_NAME=EMREP))
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/u01/oracle)
(PROGRAM=extproc))) LSNR2=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc2))))
[oracle@dbsv admin]$ cat tnsnames.ora
prod=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(port=1521)))
(CONNECT_DATA=(SERVICE_NAME=PROD)(SERVER=dedicated))) lsnr2 =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS = (PROTOCOL = TCP)(HOST = dbsv)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dbsv)(PORT = 1526))
)
)

写法一:将数据库动态注冊到单独port的监听上

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=dbsv)(PORT=1526))';

验证:

[oracle@dbsv admin]$ lsnrctl stat 

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:09:47

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date 21-JUN-2014 10:42:29
Uptime 0 days 1 hr. 27 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/network/admin/listener.ora
Listener Log File /u01/oracle/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "EMREP" has 1 instance(s).
Instance "EMREP", status UNKNOWN, has 1 handler(s) for this service...
Service "PROD" has 1 instance(s).
Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@dbsv admin]$ lsnrctl stat lsnr2 LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:09:59 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias LSNR2
Version TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date 21-JUN-2014 10:40:53
Uptime 0 days 1 hr. 29 min. 5 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/network/admin/listener.ora
Listener Log File /u01/oracle/network/log/lsnr2.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc2)))
Services Summary...
Service "PROD" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PROD_XPT" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
The command completed successfully

1521上没有动态注冊的监听库(READY)。1526port上有READY

方法二:将数据库动态注冊到一个或多个开通动态注冊服务的监听port上

在tnsnames.ora文件里写出network_name描写叙述的监听信息,如上面的lsnr2

alter system set local_listener=lsnr2;

验证:

[oracle@dbsv admin]$ lsnrctl stat 

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:13:26

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date 21-JUN-2014 10:42:29
Uptime 0 days 1 hr. 30 min. 56 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/network/admin/listener.ora
Listener Log File /u01/oracle/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "EMREP" has 1 instance(s).
Instance "EMREP", status UNKNOWN, has 1 handler(s) for this service...
Service "PROD" has 2 instance(s).
Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PROD_XPT" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@dbsv admin]$ lsnrctl stat lsnr2 LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:13:30 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias LSNR2
Version TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date 21-JUN-2014 10:40:53
Uptime 0 days 1 hr. 32 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/network/admin/listener.ora
Listener Log File /u01/oracle/network/log/lsnr2.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc2)))
Services Summary...
Service "PROD" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PROD_XPT" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
The command completed successfully

两个port上的监听。就都有数据库的动态注冊(READY)了。

oracle动态注冊參数local_listener的更多相关文章

  1. ORACLE 11G没有备份文件參数文件在异机通过rman备份恢复找回被误删的数据

    背景:          同事误删除线上数据.所以须要从备份中找回数据恢复. 真实屋漏偏逢连夜雨.船迟又遇打头风.前两天备份的磁盘坏块,如今仅仅有rman全备的.bak文件,没有控制文件和參数文件,所 ...

  2. Oracle 自己主动内存參数依赖性

    图例:在该图中使用了下面參数名称缩写: MT = MEMORY_TARGET MMT = MEMORY_MAX_TARGET ST = SGA_TARGET PAT = PGA_AGGREGATE_T ...

  3. linux kernel的cmdline參数解析原理分析

    利用工作之便,今天研究了kernel下cmdline參数解析过程.记录在此.与大家共享.转载请注明出处.谢谢. Kernel 版本:3.4.55 Kernel启动时会解析cmdline,然后依据这些參 ...

  4. 获取Oracle隐含參数信息

    Oracle数据库的初始化參数.主要来源于两个Oracle内部数据字典表:X$KSPPCV和X$KSPPI通常我们查询的V$Parameter视图或使用show parameter命令都是就来源于这两 ...

  5. Ubuntu IntelliJ IDEA 注冊碼與Gradle相關

    一.Ubuntu IntelliJ IDEA 注冊碼 在线免费生成IntelliJ IDEA 15.0(16.+)注册码 注冊參考:https://www.iteblog.com/idea/ 依次选择 ...

  6. 使用JDBC改变Oracle的session參数 NLS_DATE_FORMAT

    近期项目除了一个问题,场景大概是这种,项目在国外开发.在项目开发过程中使用了大量的Oracle函数TO_DATE,可是开发者没有写第二个參数. 所以项目在国外的server上能够正常执行.但是在国内的 ...

  7. 关于mysql存储过程创建动态表名及參数处理

      转载请注明出处:帘卷西风的专栏(http://blog.csdn.net/ljxfblog)  近期游戏開始第二次内測,開始处理操作日志.最開始把日志放到同一个表里面,发现一天时间,平均100玩家 ...

  8. ORACLE 參数文件介绍

    ORACLE数据库启动以后.通过select * from v$parameter这个语句能够查看到oracle数据库使用的全部參数. 对于oracle的參数文件,分为spfile 二进制文件和pfi ...

  9. Oracle 集群心跳及其參数misscount/disktimeout/reboottime

    在Oracle RAC中,能够从多个层次,多个不同的机制来检測RAC的健康状况,即能够通过心跳机制以及一定的投票算法来隔离故障.假设检測到某节点失败,则存在故障的节点将会被逐出集群以避免故障节点破坏数 ...

随机推荐

  1. php 抓取天气情况 www.weather.com.cn

    <?php print_r(getweather(101120501)); /** * Server 天气情况获取函数 * @param unknown $city */ function ge ...

  2. URAL 1707. Hypnotoad&#39;s Secret(树阵)

    URAL 1707. Hypnotoad's Secret space=1&num=1707" target="_blank" style="" ...

  3. 《C/C++学习指南》 - 关于本书

    称号 :<C/C++学习指南> 笔者: 邵制成 在线学习(免费),在线答疑 (免费) 创作目的:想以自己的能力和经验为国内(及国外)的读者奉献一本好书,一本让人一看就懂."不可能 ...

  4. GDI+ Tutorial for Beginners

    原文 GDI+ Tutorial for Beginners GDI+ is next evolution of GDI. Using GDI objects in earlier versions ...

  5. javascript 中 事件流和事件冒泡

    一.事件流 是描述页面接受事件的顺序,IE 使用的是时间冒泡流;而Netscape的事件采用的是事件捕获流.1.事件冒泡JS 和 HTML是通过事件的方式实现交互.事件冒泡 开始元素,将事件逐级传递, ...

  6. MFC画二维动态图表[GDI]

    源博客:http://www.codeproject.com/Articles/9350/2D-Animated-Charts 源代码:http://download.csdn.net/detail/ ...

  7. 1.1.3-学习Opencv与MFC混合编程之---画图工具 通过对话框进行工具的参数设置 画曲线 绘图校正

    源代码:http://download.csdn.net/detail/nuptboyzhb/3961688 l 对话框 1.“插入”->“资源”->“对话框” 2.对话框属性如下: 双击 ...

  8. Get Cordova Ready for Grunt and CoffeeScript

    Cordova, Grunt and Coffee You may reference to below if you deside to work with coffee instead of Ja ...

  9. POJ 2762推断单个联通(支撑点甚至通缩+拓扑排序)

    Going from u to v or from v to u? Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 14789 ...

  10. Win7安装vs2010失败

    提示: ------------------------------------------------------------------------------------------------ ...