ITPub博客

首页 > Linux操作系统 > Linux操作系统 > local_listener参数(1)---elaine

local_listener参数(1)---elaine

原创 Linux操作系统 作者:Elaine_gao 时间:2012-07-26 23:23:49 0 删除 编辑

对于local_listener,官方文档是这样描述的:

Property

Description

Parameter type

String

Syntax

LOCAL_LISTENER = network_name

Default value

(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1521)) where hostname is the network name of the local host.

Modifiable

ALTER SYSTEM

Basic

No

LOCAL_LISTENER specifies a network name that resolves to an address or address list of Oracle Net local listeners (that is, listeners that are running on the same machine as this instance). The address or address list is specified in the TNSNAMES.ORA file or other address repository as configured for your system.

个人理解:local_listener与监听的动态注册有关。

 

 

第一步,检查主机的信息

[oracle@secdb1 ~]$ cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1       localhost.localdomain   localhost

192.168.61.101  secdb1.localdomain      secdb1

第二步,检查local_listener参数

SYS@PROD>show parameter local_

 

NAME                  TYPE        VALUE

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

local_listener           string

第三步,启动监听

[oracle@secdb1 ~]$ lsnrctl

 

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 26-JUL-2012 21:07:27

 

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

 

Welcome to LSNRCTL, type "help" for information.

 

LSNRCTL> start

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

 

TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))

 

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

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                26-JUL-2012 21:07:32

Uptime                    0 days 0 hr. 0 min. 1 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))

The listener supports no services

The command completed successfully

第四步,等待实例注册成功

LSNRCTL> status

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

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                26-JUL-2012 21:07:32

Uptime                    0 days 0 hr. 0 min. 47 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))

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

 

结论:(1)由“(DESCRIPTION = (ADDRESS =(PROTOCOL=tcp) (HOST =secdb1.localdomain)(PORT =1521 )))”可以得出,实例PROD确实注册到监听上了。监听所使用的protocoltcp,使用的端口是1521。这一动态注册过程是由PMON进程作用的。

结论:(2)动态注册默认只注册到默认的监听器上(名称是LISTENER、端口是1521、协议是TCP),因为pmon只会动态注册port等于1521的监听,否则pmon不能动态注册listener,如果需要向非默认监听注册,则需要配置local_listener参数!

 

~~新手上路,多多指教~~

   小妞elaine

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26863369/viewspace-737093/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-04-08

  • 博文量
    8
  • 访问量
    3167