oracle动态注冊參数local_listener
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的更多相关文章
- ORACLE 11G没有备份文件參数文件在异机通过rman备份恢复找回被误删的数据
背景: 同事误删除线上数据.所以须要从备份中找回数据恢复. 真实屋漏偏逢连夜雨.船迟又遇打头风.前两天备份的磁盘坏块,如今仅仅有rman全备的.bak文件,没有控制文件和參数文件,所 ...
- Oracle 自己主动内存參数依赖性
图例:在该图中使用了下面參数名称缩写: MT = MEMORY_TARGET MMT = MEMORY_MAX_TARGET ST = SGA_TARGET PAT = PGA_AGGREGATE_T ...
- linux kernel的cmdline參数解析原理分析
利用工作之便,今天研究了kernel下cmdline參数解析过程.记录在此.与大家共享.转载请注明出处.谢谢. Kernel 版本:3.4.55 Kernel启动时会解析cmdline,然后依据这些參 ...
- 获取Oracle隐含參数信息
Oracle数据库的初始化參数.主要来源于两个Oracle内部数据字典表:X$KSPPCV和X$KSPPI通常我们查询的V$Parameter视图或使用show parameter命令都是就来源于这两 ...
- Ubuntu IntelliJ IDEA 注冊碼與Gradle相關
一.Ubuntu IntelliJ IDEA 注冊碼 在线免费生成IntelliJ IDEA 15.0(16.+)注册码 注冊參考:https://www.iteblog.com/idea/ 依次选择 ...
- 使用JDBC改变Oracle的session參数 NLS_DATE_FORMAT
近期项目除了一个问题,场景大概是这种,项目在国外开发.在项目开发过程中使用了大量的Oracle函数TO_DATE,可是开发者没有写第二个參数. 所以项目在国外的server上能够正常执行.但是在国内的 ...
- 关于mysql存储过程创建动态表名及參数处理
转载请注明出处:帘卷西风的专栏(http://blog.csdn.net/ljxfblog) 近期游戏開始第二次内測,開始处理操作日志.最開始把日志放到同一个表里面,发现一天时间,平均100玩家 ...
- ORACLE 參数文件介绍
ORACLE数据库启动以后.通过select * from v$parameter这个语句能够查看到oracle数据库使用的全部參数. 对于oracle的參数文件,分为spfile 二进制文件和pfi ...
- Oracle 集群心跳及其參数misscount/disktimeout/reboottime
在Oracle RAC中,能够从多个层次,多个不同的机制来检測RAC的健康状况,即能够通过心跳机制以及一定的投票算法来隔离故障.假设检測到某节点失败,则存在故障的节点将会被逐出集群以避免故障节点破坏数 ...
随机推荐
- HTML - HTML Commonly Used Character Entities
HTML Entities Some characters are reserved in HTML. It is not possible to use the less than (<) o ...
- js数组基础整理
首页: 主要整理了一下数组中常用的一些基础知识,代码都是自己手敲,有不对的地方希望能指出,目前只有4篇,后续会不断的增加这一板块. 由于少于100字不能发所以把一些最基本的创建数组也写上. // 创建 ...
- MFC画二维动态图表[GDI]
源博客:http://www.codeproject.com/Articles/9350/2D-Animated-Charts 源代码:http://download.csdn.net/detail/ ...
- django admin manytomany获取所选字段值
和一般views中前端数据的获取一样. def save_model(self, request, obj, form, change): door_id_list= request. ...
- jquery如何在加载完iframe的内容后才进行下一步操作
为iframe添加onload事件 ie使用attachEvent("onload",function(){}) firefox.chrome使用addEventListener( ...
- MySQL备份方案-->(利用mysqldump以及binlog二进制日志)
MySQL备份方案-->(利用mysqldump以及binlog二进制日志) 随着数据不 ...
- HDOJ 2442 -bricks 状态压缩DP 一直TLE.打表过的..
有5个砖块..加上一个空着不放..那么有6种状态..所以很明显的可以用6进制的状态DP... 不过这么做..我觉得我已经能优化的都优化了...还是超时..一看数据范围是100*6..打表先AC了.. ...
- linux c正则
c 正则 -------------------------------------------------- 标准的C和C++都不支持正则表达式,但有一些函数库可以辅助C/C++程序员完成这一 ...
- 【iOS】iOS的iTunes文件共享,在程序Document路径
有时候程序开发须要通过沙盒中的 documents目录与用户共享文件,iTunes默认是不支持iTunes file Sharing的,首先设置 info-list的Application suppo ...
- 程序启动读取和关闭时保存应用程序设置(QSettings)
保存应用程序设置(QSettings)1. QSettings 类 QSettings 提供保存应用程序当前设置的接口,可以方便地保存程序的状态,例如窗口大小和位置,选项的选中状态等等.在 Windo ...