使用LOCAL_LISTENER参数进行多监听动态注册

使用LOCAL_LISTENER参数进行多监听动态注册
 
在默认情况下,oracle使用1521作为默认端口进行动态注册,而共享服务器模式则必须通过动态注册方式进行配置。
但是如果有多个监听需要同时进行动态注册怎么办呢?我们可以利用LOCAL_LISTENER参数进行配置。
第一种方式:直接将监听信息配置在参数里面,这种方式比较简单,但是看起来比较乱也不能配置太多的监听。
设置LOCAL_LISTENER=(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST = RHEL4)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = RHEL4)(PORT = 1522)))
第二种方式:通过TNS名字进行地址解析
LOCAL_LSNR =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = RHEL4)(PORT = 1522))
      (ADDRESS = (PROTOCOL = TCP)(HOST = RHEL4)(PORT = 1521))
    )
  )
 
设置LOCAL_LISTENER=LOCAL_LSNR
最后你通过lsnrctl service listener;lsnrctl service listener1 查看共享服务是否已经注册到监听里面
[oracle@RHEL4 dbs]$ lsnrctl service listener
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 04-NOV-2010 22:40:47
Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RHEL4)(PORT=1521)))
Services Summary...
Service "cyclebin" has 2 instance(s).
  Instance "cyclebin", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
  Instance "cyclebin", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "cyclebinXDB" has 1 instance(s).
  Instance "cyclebin", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1002 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=tcp)(HOST=RHEL4)(PORT=32809))
The command completed successfully
[oracle@RHEL4 dbs]$ lsnrctl service listener1
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 04-NOV-2010 22:40:49
Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RHEL4)(PORT=1522)))
Services Summary...
Service "cyclebin" has 2 instance(s).
  Instance "cyclebin", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0
         LOCAL SERVER
  Instance "cyclebin", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "cyclebinXDB" has 1 instance(s).
  Instance "cyclebin", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1002 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=tcp)(HOST=RHEL4)(PORT=32809))

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13605188/viewspace-678342/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13605188/viewspace-678342/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值