zoukankan      html  css  js  c++  java
  • 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。

  • 相关阅读:
    《哈佛大学公开课:公正该如何做是好?》学习笔记3
    iPhone客户端开发笔记(三)
    iPhone客户端开发笔记(一)
    今天讨论了下本地化服务信息应用
    云游第一天感受
    昨晚调试一段PHP程序时遇到的三个问题
    iPhone客户端开发笔记(四)
    《哈佛大学公开课:公正该如何做是好?》学习笔记2
    Oracle10g数据库归档与非归档模式下的备份与恢复
    javascript 实现页面间传值
  • 原文地址:https://www.cnblogs.com/likingzi/p/6509913.html
Copyright © 2011-2022 走看看