楼主: jayli426

[讨论] 动态监听和静态监听可以同时存在吗?

[复制链接]
论坛徽章:
6
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:29咸鸭蛋
日期:2011-11-09 14:50:32咸鸭蛋
日期:2012-06-13 05:10:53三菱
日期:2013-09-17 09:52:46优秀写手
日期:2013-12-18 09:29:13马上加薪
日期:2014-10-15 18:26:41
21#
发表于 2013-9-17 17:11 | 只看该作者
guoyJoe 发表于 2013-9-17 17:09
去服务器端看lsnrctl status

服务端是unknown和ready都有,那说明静态和动态都有。 那我怎么知道客户端是通过那个监听连接上去的?

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

使用道具 举报

回复
论坛徽章:
490
红宝石
日期:2014-04-05 19:53:18海蓝宝石
日期:2014-04-05 21:24:30数据库板块每日发贴之星
日期:2013-05-27 22:53:45生肖徽章:鸡
日期:2014-08-24 18:39:29青年奥林匹克运动会-羽毛球
日期:2014-09-24 08:37:59马上有房
日期:2015-01-03 10:23:28喜羊羊
日期:2015-03-04 14:54:422015年新春福章
日期:2015-03-06 11:59:47秀才
日期:2017-04-06 18:09:28版主6段
日期:2014-05-27 02:19:57
22#
发表于 2013-9-17 17:13 | 只看该作者
本帖最后由 guoyJoe 于 2013-9-17 17:14 编辑

你看一下用的是哪个服务,哪个端口?贴有所有信息来……。lsnrctl status

使用道具 举报

回复
论坛徽章:
6
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:29咸鸭蛋
日期:2011-11-09 14:50:32咸鸭蛋
日期:2012-06-13 05:10:53三菱
日期:2013-09-17 09:52:46优秀写手
日期:2013-12-18 09:29:13马上加薪
日期:2014-10-15 18:26:41
23#
发表于 2013-9-17 17:17 | 只看该作者
guoyJoe 发表于 2013-9-17 17:13
你看一下用的是哪个服务,哪个端口?贴有所有信息来……。lsnrctl status

racle@linux_lbi_10:/oracle/app/product/11g/db/network/admin> lsnrctl status

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 05-JUN-2012 17:13:11

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date                06-JUN-2012 01:56:02
Uptime                    496 days 17 hr. 45 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/app/product/11g/db/network/admin/listener.ora
Listener Log File         /oracle/app/diag/tnslsnr/linux_lbi_10/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.71.180.82)(PORT=1521)))
Services Summary...
Service "ora11g" has 2 instance(s).
  Instance "ora11g", status UNKNOWN, has 1 handler(s) for this service...
  Instance "ora11g", status READY, has 1 handler(s) for this service...
Service "ora11gXDB" has 1 instance(s).
  Instance "ora11g", status READY, has 1 handler(s) for this service...
Service "ora11g_XPT" has 1 instance(s).
  Instance "ora11g", status READY, has 1 handler(s) for this service...
The command completed successfully


全部信息,如何判断?

使用道具 举报

回复
论坛徽章:
490
红宝石
日期:2014-04-05 19:53:18海蓝宝石
日期:2014-04-05 21:24:30数据库板块每日发贴之星
日期:2013-05-27 22:53:45生肖徽章:鸡
日期:2014-08-24 18:39:29青年奥林匹克运动会-羽毛球
日期:2014-09-24 08:37:59马上有房
日期:2015-01-03 10:23:28喜羊羊
日期:2015-03-04 14:54:422015年新春福章
日期:2015-03-06 11:59:47秀才
日期:2017-04-06 18:09:28版主6段
日期:2014-05-27 02:19:57
24#
发表于 2013-9-17 17:24 | 只看该作者
shentao19890909 发表于 2013-9-17 17:17
racle@linux_lbi_10:/oracle/app/product/11g/db/network/admin> lsnrctl status

LSNRCTL for Linux:  ...

ora76 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.71.180.76)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora11g)
    )
  )
你连的是静态和动态两个。

使用道具 举报

回复
论坛徽章:
6
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:29咸鸭蛋
日期:2011-11-09 14:50:32咸鸭蛋
日期:2012-06-13 05:10:53三菱
日期:2013-09-17 09:52:46优秀写手
日期:2013-12-18 09:29:13马上加薪
日期:2014-10-15 18:26:41
25#
发表于 2013-9-17 17:30 | 只看该作者
guoyJoe 发表于 2013-9-17 17:24
ora76 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.71.180.76)(PORT = 1521))

判断的依据是啥?跪求

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
26#
发表于 2013-9-17 23:02 | 只看该作者
If you have both dynamic and static registration for the same service, the dynamic one will be used. You can tell by "lsnrctl service", which maintains cumulative counters for established and refused connections.

使用道具 举报

回复
论坛徽章:
6
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:29咸鸭蛋
日期:2011-11-09 14:50:32咸鸭蛋
日期:2012-06-13 05:10:53三菱
日期:2013-09-17 09:52:46优秀写手
日期:2013-12-18 09:29:13马上加薪
日期:2014-10-15 18:26:41
27#
发表于 2013-9-18 09:06 | 只看该作者
Yong Huang 发表于 2013-9-17 23:02
If you have both dynamic and static registration for the same service, the dynamic one will be used. ...

oracle@linux_lbi_10:/oracle/app/product/11g/db/network/admin> lsnrctl service

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 06-JUN-2012 09:03:39

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "ora11g" has 2 instance(s).
  Instance "ora11g", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:150 refused:9088
         LOCAL SERVER
  Instance "ora11g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:45670 refused:0 state:ready
         LOCAL SERVER
Service "ora11gXDB" has 1 instance(s).
  Instance "ora11g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: linux_lbi_10, pid: 17046>
         (ADDRESS=(PROTOCOL=tcp)(HOST=linux_lbi_10)(PORT=60391))
Service "ora11g_XPT" has 1 instance(s).
  Instance "ora11g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:45670 refused:0 state:ready
         LOCAL SERVER
The command completed successfully
客户端有近100个session在连接。
SQL> select count(1) from v$session t where t.USERNAME is not null;

  COUNT(1)
----------
        99
---------------------------------
怎么解释上面那些监听信息?
难道这99个session都是通过动态监听来连接的?

使用道具 举报

回复
论坛徽章:
6
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:29咸鸭蛋
日期:2011-11-09 14:50:32咸鸭蛋
日期:2012-06-13 05:10:53三菱
日期:2013-09-17 09:52:46优秀写手
日期:2013-12-18 09:29:13马上加薪
日期:2014-10-15 18:26:41
28#
发表于 2013-9-18 10:13 | 只看该作者
guoyJoe 发表于 2013-9-17 17:24
ora76 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.71.180.76)(PORT = 1521))

如何屏蔽动态注册?只让oracle有静态注册

使用道具 举报

回复
论坛徽章:
490
红宝石
日期:2014-04-05 19:53:18海蓝宝石
日期:2014-04-05 21:24:30数据库板块每日发贴之星
日期:2013-05-27 22:53:45生肖徽章:鸡
日期:2014-08-24 18:39:29青年奥林匹克运动会-羽毛球
日期:2014-09-24 08:37:59马上有房
日期:2015-01-03 10:23:28喜羊羊
日期:2015-03-04 14:54:422015年新春福章
日期:2015-03-06 11:59:47秀才
日期:2017-04-06 18:09:28版主6段
日期:2014-05-27 02:19:57
29#
发表于 2013-9-18 10:33 | 只看该作者
shentao19890909 发表于 2013-9-18 10:13
如何屏蔽动态注册?只让oracle有静态注册

再添加一个服务即可。

使用道具 举报

回复
论坛徽章:
6
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:29咸鸭蛋
日期:2011-11-09 14:50:32咸鸭蛋
日期:2012-06-13 05:10:53三菱
日期:2013-09-17 09:52:46优秀写手
日期:2013-12-18 09:29:13马上加薪
日期:2014-10-15 18:26:41
30#
发表于 2013-9-18 15:57 | 只看该作者
guoyJoe 发表于 2013-9-18 10:33
再添加一个服务即可。

版主大人,再添加一个服务是啥意思?
能我我例子吗,或者网上这份资料的url,我没有搜到这方面资料。

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表