关闭

Oracle监听lsnrctl查询状态详解

标签: oracletcpservice数据库commandnetwork
10269人阅读 评论(0) 收藏 举报
分类:

过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
0

猜你在找
【直播】机器学习&数据挖掘7周实训--韦玮
【套餐】系统集成项目管理工程师顺利通关--徐朋
【直播】3小时掌握Docker最佳实战-徐西宁
【套餐】机器学习系列套餐(算法+实战)--唐宇迪
【直播】计算机视觉原理及实战--屈教授
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之矩阵--黄博士
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之凸优化--马博士
【套餐】Javascript 设计模式实战--曾亮
查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:235617次
    • 积分:2309
    • 等级:
    • 排名:第16128名
    • 原创:3篇
    • 转载:103篇
    • 译文:0篇
    • 评论:11条
    文章分类
    最新评论