11g GI监听测试增加其他本地端口

11.2 GI中监听器的地址和端口信息被移到了 endpoints_listener.ora中。

使用 endpoints_listener.ora的情况下不应使用lsnrctl管理LISTENER,而需使用srvctl或crsctl工具管理,否则lsnrctl将不会识别endpoints_listener.ora中的信息,造成监听没有在必要地址、端口上工作。

而在11.2 RAC中listener.ora仅记录LISTENER的IPC条目。这样做的目的是方便dbca配置数据库参数及tnsnames.ora配置文件。

除了使用netca、netmgr图形工具外,还可以使用命令行动态注册监听:

srvctl add listener -l kktest -p 1526

srvctl start listener -l kktest

相应的配置信息写入了配置文件,如下:

[grid@rac1:/u01/app/11.2.0/grid/network/admin]cat listener.ora
KKTEST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=KKTEST)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_KKTEST=ON # line added by Agent
[grid@rac1:/u01/app/11.2.0/grid/network/admin]cat endpoints_listener.ora
KKTEST_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.222.65)(PORT=1526)(IP=FIRST)))) # line added by Agent
LISTENER_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.222.65)(PORT=1521)(IP=FIRST)))) # line added by Agent

但此时新监听supports no services,如下:

Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=KKTEST)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.222.65)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.222.66)(PORT=1526)))
The listener supports no services

需加入静态注册信息,如下:

[grid@rac1:/u01/app/11.2.0/grid/network/admin]cat listener.ora
KKTEST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=KKTEST))))            # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))        # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))             # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_KKTEST=ON                # line added by Agent

SID_LIST_KKTEST =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = prod)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
      (SID_NAME = prod1)
    )
  )

重启监听,如下:

[grid@rac1:/u01/app/11.2.0/grid/network/admin]srvctl stop listener -l KKTEST
[grid@rac1:/u01/app/11.2.0/grid/network/admin]srvctl start listener -l KKTEST
[grid@rac1:/u01/app/11.2.0/grid/network/admin]lsnrctl status KKTEST

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-MAR-2017 14:58:39

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=KKTEST)))
STATUS of the LISTENER
------------------------
Alias                     KKTEST
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                06-MAR-2017 14:58:20
Uptime                    0 days 0 hr. 0 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/rac1/kktest/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=KKTEST)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.222.65)(PORT=1526)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.222.66)(PORT=1526)))
Services Summary...
Service "prod" has 1 instance(s).
  Instance "prod1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

重启系统,新的状态,如下:

[grid@rac1:/u01/app/11.2.0/grid/network/admin]lsnrctl status KKTEST

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-MAR-2017 15:58:10

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=KKTEST)))
STATUS of the LISTENER
------------------------
Alias                     KKTEST
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                06-MAR-2017 15:42:02
Uptime                    0 days 0 hr. 16 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/rac1/kktest/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=KKTEST)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.222.65)(PORT=1526)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.222.66)(PORT=1526)))
Services Summary...
Service "SYS$SYS.SCHEDULER$_EVENT_QUEUE.PROD" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prod" has 2 instance(s).
  Instance "prod1", status UNKNOWN, has 1 handler(s) for this service...
  Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prod_TAF" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
The command completed successfully

可见KKTEST监听,在ip 65、66的1526端口,支持相关的服务prod、prod_TAF。

posted @ 2017-03-06 16:06  likingzi  阅读(264)  评论(0编辑  收藏  举报