设为首页 加入收藏

TOP

实现Oracle非1521标准端口动态注册(四)
2015-11-10 12:16:32 来源: 作者: 【 】 浏览:3
Tags:实现 Oracle 1521 标准 动态 注册
e实例动态注册动作是在1521端口的监听程序上进行的,1531端口并没有被注册;


默认监听器的问题好解决,只要我们只保留一个监听即可。那么,如何让Oracle实例在1531端口进行注册,不在1521端口进行注册呢?


解决的方法就是使用local_listener配置参数。默认情况下,该参数为空。


SQL> show parameter listener;


NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TYPE? ? ? ? VALUE


------------------------------------ ----------- ------------------------------


listener_networks? ? ? ? ? ? ? ? ? ? string


local_listener? ? ? ? ? ? ? ? ? ? ? string


remote_listener? ? ? ? ? ? ? ? ? ? ? string


该参数用于明确指定Oracle实例向哪一个监听器上进行注册动作。通常对于非标准端口注册,都需要将注册监听信息修改参数。


SQL> show parameter local


NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TYPE? ? ? ? VALUE


------------------------------------ ----------- ------------------------------


local_listener? ? string? ? ? (ADDRESS_LIST=(Address=(Protoc? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ol=tcp)(HOST=AAALIFE)(Port=1531)))


log_archive_local_first? ? ? ? ? ? ? boolean? ? TRUE


parallel_force_local? ? ? ? ? ? ? ? boolean? ? FALSE


注意:该参数local_listener修改范围支持both方式,立即生效不需要重新启动实例。


此时,监听器状态如下:


[oracle@aaalife dbs]$ lsnrctl status


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 07-SEP-2015 02:32:25


Copyright (c) 1991, 2013, Oracle.? All rights reserved.


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))


STATUS of the LISTENER


------------------------


Alias? ? ? ? ? ? ? ? ? ? LISTENER


Version? ? ? ? ? ? ? ? ? TNSLSNR for Linux: Version 11.2.0.4.0 - Production


Start Date? ? ? ? ? ? ? ? 07-SEP-2015 01:27:53


Uptime? ? ? ? ? ? ? ? ? ? 0 days 1 hr. 4 min. 32 sec


Trace Level? ? ? ? ? ? ? off


Security? ? ? ? ? ? ? ? ? ON: Local OS Authentication


SNMP? ? ? ? ? ? ? ? ? ? ? OFF


Listener Parameter File? /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora


Listener Log File? ? ? ? /u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log.xml


Listening Endpoints Summary...


(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))


The listener supports no services


The command completed successfully


[oracle@aaalife dbs]$ lsnrctl status my_listener


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 07-SEP-2015 02:32:33


Copyright (c) 1991, 2013, Oracle.? All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1531)))


STATUS of the LISTENER


------------------------


Alias? ? ? ? ? ? ? ? ? ? LISTENER


Version? ? ? ? ? ? ? ? ? TNSLSNR for Linux: Version 11.2.0.4.0 - Production


Start Date? ? ? ? ? ? ? ? 07-SEP-2015 01:17:52


Uptime? ? ? ? ? ? ? ? ? ? 0 days 1 hr. 14 min. 41 sec


Trace Level? ? ? ? ? ? ? off


Security? ? ? ? ? ? ? ? ? ON: Local OS Authentication


SNMP? ? ? ? ? ? ? ? ? ? ? OFF


Listener Parameter File? /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora


Listener Log File? ? ? ? /u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log.xml


Listening Endpoints Summary...


(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1531)))


(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1531)))


Services Summary...


Service "aaadb" has 1 instance(s).


Instance "aaadb", status READY, has 1 handler(s) for this service...


Service "aaadbXDB" has 1 instance(s).


Instance "aaadb", status READY, has 1 handler(s) for this service...


The command completed successfully


实例向1531端口进行动态注册了,原有1521默认监听器没有注册信息。


那么,还有一个问题,就是local_listener设置值。该值采用括号表达式进行书写,是Oracle Net Service内部使用的一种方式。从管理角度看,这种策略不是很好的方法。我们直接将端口编号书写在数据库参数中,不但容易泄露部署信息,而且在发生迁移、变更动作的时候,这种方式也会有一些问题。


所以,Oracle官方支持监听器别名方法进行配置local_listener。


3、设置监听器别名


一个很有意思的现象是,在local_listener的配置问题上,MOS和网络同仁们的差异是很大的。MOS官方意见是将监听器别名设置上,而网络同仁们无一例外的选择“括号表达式”。


笔者实验的

首页 上一页 1 2 3 4 5 下一页 尾页 4/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle Data Guard LOG_ARCHIVE_D.. 下一篇非规范处理IMP-00010错误一例

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: