Oracle监听lsnrctl查询状态详解

过lsnrctl查询到的状态显示如下

 

 

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm1.oracle.domain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                17-MAY-2011 21:03:40
Uptime                    0 days 0 hr. 2 min. 49 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/10.2.1/db/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/10.2.1/db/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1600)))
Services Summary...
Service "POD" has 1 instance(s).
  Instance "POD", status READY, has 1 handler(s) for this service...
Service "POD1" has 1 instance(s).
  Instance "POD", status UNKNOWN, has 1 handler(s) for this service...
Service "PODS" has 1 instance(s).
  Instance "POD", status READY, has 2 handler(s) for this service...
Service "pod_XPT" has 1 instance(s).
  Instance "POD", status READY, has 1 handler(s) for this service...
Service "repos" has 2 instance(s).
  Instance "repos", status UNKNOWN, has 1 handler(s) for this service...
  Instance "repos", status READY, has 1 handler(s) for this service...
Service "repos_XPT" has 1 instance(s).
  Instance "repos", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 status详解

Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1600)))

#此处说明该主机地址为ocm1.oracle.domain,开启的监听端口有1521,1522,1600


Services Summary...
Service "POD" has 1 instance(s).
  Instance "POD", status READY, has 1 handler(s) for this service...

#此处说明有一个服务名POD的服务,数据库实例名为POD,状态READY说明其目前处于动态注册


Service "POD1" has 1 instance(s).
  Instance "POD", status UNKNOWN, has 1 handler(s) for this service...

#此处说明有一个服务名为POD1的服务,数据库的实例名为POD,状态UNKNOWN说明其目前是静态注册


Service "PODS" has 1 instance(s).
  Instance "POD", status READY, has 2 handler(s) for this service...

#此处说明有一个服务名为PODS的服务,数据库实例名为POD,状态READY说明其是动态注册

 

Service "repos" has 2 instance(s).
  Instance "repos", status UNKNOWN, has 1 handler(s) for this service...
  Instance "repos", status READY, has 1 handler(s) for this service...
The command completed successfully

#此处说明有一个服务名为repos的服务,对应数据库实例为repos,UNKNOWN,READY状态说明其目前有一个静态注册和一个动态注册

 

 LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm1.oracle.domain)(PORT=1521)))
Services Summary...
Service "POD" has 1 instance(s).
  Instance "POD", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "POD1" has 1 instance(s).
  Instance "POD", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
Service "PODS" has 1 instance(s).
  Instance "POD", status READY, has 2 handler(s) for this service...
    Handler(s):
      "D001" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ocm1.oracle.domain, pid: 28400>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37290))
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ocm1.oracle.domain, pid: 28398>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37288))
Service "pod_XPT" has 1 instance(s).
  Instance "POD", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "repos" has 2 instance(s).
  Instance "repos", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
  Instance "repos", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "repos_XPT" has 1 instance(s).
  Instance "repos", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

 

service详解

Service "POD" has 1 instance(s).
  Instance "POD", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER

#名为POD的服务,对应数据库实例为POD,状态READY说明其处于动态注册

DEDICATED" established:0 refused:0 state:ready说明是专有连接,连接数为0拒绝数为0,状态:动态


Service "POD1" has 1 instance(s).
  Instance "POD", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER

#名为POD1的服务,对应数据库实例为POD,状态UNKNOWN说明其处于静态注册

DEDICATED" established:2 refused:0说明是专有连接,连接数为2拒绝数为0


Service "PODS" has 1 instance(s).
  Instance "POD", status READY, has 2 handler(s) for this service...
    Handler(s):
      "D001" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ocm1.oracle.domain, pid: 28400>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37290))
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ocm1.oracle.domain, pid: 28398>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37288))

#名为PODS的服务,对应数据库实例名为POD的数据库,READY状态说明其为动态注册

"D001" established:0 refused:0 current:0 max:1022 state:ready

 "D000" established:0 refused:0 current:0 max:1022 state:ready

这里说明其为share模式,目前,两个dispatcher目前都连接为0,拒绝为0,最大数为1022,状态是动态注册

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

对应sql查询

SQL> show parameter dispatchers

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dispatchers                          string
max_dispatchers                      integer
SQL> alter system set dispatchers='(protocol=tcp) (dispatchers=2)';
System altered.
SQL> show parameter dispatchers
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dispatchers                          string      (protocol=tcp) (dispatchers=2)
max_dispatchers                      integer
SQL> select name,network,paddr,status from v$dispatcher;
NAME NETWORK                                                                          PADDR    STATUS
---- -------------------------------------------------------------------------------- -------- ----------------
D000 (ADDRESS=(PROTOCOL=tcp)(HOST=seagull)(PORT=37288))                               2A220390 WAIT
D001 (ADDRESS=(PROTOCOL=tcp)(HOST=seagull)(PORT=37290))                               2A220948 WAIT

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

Service "repos" has 2 instance(s).
  Instance "repos", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
  Instance "repos", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER

#repos服务对应的实例有2个,但此处都为实例repos,一个为静态UNKNOWN,一个为动态READY,目前连接数都为0,拒绝也为0
The command completed successfully

 

  • 0
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值