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. Android应用开发学习笔记之BroadcastReceiver

    作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz 一.BroadcastReceiver机制概述 Broadcast Receiver是Android的一种“广播发布 ...

  2. Swift - 闭包的介绍及用法(以数组排序为例)

    闭包(即一些小的匿名代码块),可以像函数一样使用.可以很方便的将闭包传给其他函数,告诉它们应当如何执行某一个任务. 1,使用sort方法和闭包进行数组排序 sort方法返回一个数组的有序版本.(sor ...

  3. MSSQL - 存储过程事物

    效果: 创建带有事物的存储过程: use sales --指定数据库 create table bb --创建bb 这个表 ( ID int not null primary key ,--账号 Mo ...

  4. 重操JS旧业第九弹:函数表达式

    函数表达式,什么概念,表达式中的函数表达式. 1 函数申明 function 函数名([函数参数]){ //函数体 } js中无论像这样的显示函数什么放在调用之前还是调用之后,都不影响使用,因为js解 ...

  5. UVA 10911 Forming Quiz Teams(dp + 集合最优配对问题)

    4th IIUC Inter-University Programming Contest, 2005 G Forming Quiz Teams Input: standard input Outpu ...

  6. Hadoop基于文件的数据结构及实例

    基于文件的数据结构 两种文件格式: 1.SequenceFile 2.MapFile SequenceFile 1.SequenceFile文件是Hadoop用来存储二进制形式的<key,val ...

  7. MsSqlServer bak文件数据导入

    MsSqlServer  bak文件数据导入 第一步首先在你的数据库中建立一个空数据库 选中新建的数据库 鼠标右键 任务 还原 数据库 这个时候会弹出这种一个框 之后选择原设备 会弹出 点击加入 找到 ...

  8. C++STL之set容器及stream类

    首先讲stream流类 头文件#include <sstream> 其功能是进行不同类型之间的转换,跟C语言 fscanf 和 fprintf 作用是同样的,可是比C语言的更简便更好用. ...

  9. hdu 4507 数位dp(求和,求平方和)

    http://acm.hdu.edu.cn/showproblem.php?pid=4507 Problem Description 单身! 依旧单身! 吉哥依旧单身! DS级码农吉哥依旧单身! 所以 ...

  10. MongoDB学习笔记(二) 通过samus驱动实现基本数据操作

    传统的关系数据库一般由数据库(database).表(table).记录(record)三个层次概念组成,MongoDB是由(database).集合(collection).文档对象(documen ...