oracle动态注册参数local_listener

local_listener参数有两种书写格式,提供了不同的功能。

监听文件上,1521和1526端口上都有动态监听端口。

[[email protected] admin]$ cat listener.ora
LISTENER=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=PROD)
      (ORACLE_HOME=/u01/oracle)
      (SID_NAME=PROD))
    (SID_DESC=
      (GLOBAL_DBNAME=EMREP)
      (ORACLE_HOME=/u01/oracle)
      (SID_NAME=EMREP))
    (SID_DESC=
      (SID_NAME=plsextproc)
      (ORACLE_HOME=/u01/oracle)
      (PROGRAM=extproc)))

LSNR2=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc2))))
[[email protected] admin]$ cat tnsnames.ora
prod=
 (DESCRIPTION=
  (ADDRESS_LIST=
     (ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(port=1521)))
   (CONNECT_DATA=(SERVICE_NAME=PROD)(SERVER=dedicated)))

lsnr2 =
(DESCRIPTION=
	(ADDRESS_LIST=
		(ADDRESS = (PROTOCOL = TCP)(HOST = dbsv)(PORT = 1521))
		(ADDRESS = (PROTOCOL = TCP)(HOST = dbsv)(PORT = 1526))
	)
)

写法一:将数据库动态注册到单独端口的监听上

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=dbsv)(PORT=1526))';

验证:

[[email protected] admin]$ lsnrctl stat 

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:09:47

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date                21-JUN-2014 10:42:29
Uptime                    0 days 1 hr. 27 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/network/admin/listener.ora
Listener Log File         /u01/oracle/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "EMREP" has 1 instance(s).
  Instance "EMREP", status UNKNOWN, has 1 handler(s) for this service...
Service "PROD" has 1 instance(s).
  Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
  Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[[email protected] admin]$ lsnrctl stat lsnr2

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:09:59

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias                     LSNR2
Version                   TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date                21-JUN-2014 10:40:53
Uptime                    0 days 1 hr. 29 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/network/admin/listener.ora
Listener Log File         /u01/oracle/network/log/lsnr2.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc2)))
Services Summary...
Service "PROD" has 1 instance(s).
  Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PROD_XPT" has 1 instance(s).
  Instance "PROD", status READY, has 1 handler(s) for this service...
The command completed successfully

1521上没有动态注册的监听库(READY),1526端口上有READY

方法二:将数据库动态注册到一个或多个开通动态注册服务的监听端口上

在tnsnames.ora文件中写出network_name描述的监听信息,如上面的lsnr2

alter system set local_listener=lsnr2;

验证:

[[email protected] admin]$ lsnrctl stat 

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:13:26

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date                21-JUN-2014 10:42:29
Uptime                    0 days 1 hr. 30 min. 56 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/network/admin/listener.ora
Listener Log File         /u01/oracle/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "EMREP" has 1 instance(s).
  Instance "EMREP", status UNKNOWN, has 1 handler(s) for this service...
Service "PROD" has 2 instance(s).
  Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
  Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PROD_XPT" has 1 instance(s).
  Instance "PROD", status READY, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
  Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[[email protected] admin]$ lsnrctl stat lsnr2

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 21-JUN-2014 12:13:30

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias                     LSNR2
Version                   TNSLSNR for Linux: Version 10.2.0.2.0 - Production
Start Date                21-JUN-2014 10:40:53
Uptime                    0 days 1 hr. 32 min. 37 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/network/admin/listener.ora
Listener Log File         /u01/oracle/network/log/lsnr2.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsv)(PORT=1526)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc2)))
Services Summary...
Service "PROD" has 1 instance(s).
  Instance "PROD", status READY, has 1 handler(s) for this service...
Service "PROD_XPT" has 1 instance(s).
  Instance "PROD", status READY, has 1 handler(s) for this service...
The command completed successfully

两个端口上的监听,就都有数据库的动态注册(READY)了。

oracle动态注册参数local_listener,布布扣,bubuko.com

时间: 2024-08-04 18:26:55

oracle动态注册参数local_listener的相关文章

oracle动态注册和静态注册监听器

oracle动态注册和静态注册的区别:动态监听不需要在listener.ora文件中记录关于数据的任何信息,只需要将监听器的配置信息写入到该文件.例如: LISTENER = (DESCRIPTION_LIST =   (DESCRIPTION =    (ADDRESS=(PROTOCOL = IPC) (KEY=EXTPRO1))    (ADDRESS=(PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))    ) ) 客户端的tnsnam

ORACLE 动态注册和静态注册的区别(转)

1, oracle 10g 用netca方式建立的都默认为动态注册方式2,如果想改为静态注册的方式则在listener.ora 中加入如下内容即可 SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = JEFF ) (OR

oracle动态 静态参数修改规则

SQL> select name,value,isses_modifiable(session级别修改的参数),issys_modifiable(system级别修改的参数)  2  from V$PARAMETER  3  where name='max_dump_file_size'; SQL>alter system reset _allow_resetlogs_corruption scope=spfile sid='*'; 如果ISSES_MODIFIABLE=true,表明这个参数

Oracle监听静态注册和动态注册

静态注册和动态注册总结 一.什么是注册? 注册就是将数据库作为一个服务注册到监听程序.客户端不需要知道数据库名和实例名,只需要知道该数据库对外提供的服务名就可以申请连接到数据库.这个服务名可能与实例名一样,也有可能不一样.在数据库服务器启动过程中,数据库服务器会向监听程序注册相应的服务(无论何时启动一个数据库,默认地都有两条信息注册到监听器中:数据库服务器对应的实例和服务.)相当于是这样:在数据库服务器和客户端之间有一监听程序(Listener),在监听程序中,会记录相应数据库对应的服务名(一个

Oracle 动态/静态监听注册

一.动态监听 oracle监听器是一个独立的进程,通常在数据库实例启动前先启动,当oracle实例在open时,会动态向监听器程序注册其service_names和instance_name.实例启动的时候,PMON进程会根据instance_name,service_name参数将实例和服务动态注册到listerer中. 1. listener.ora默认配置文件 # cat /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.

oracle监听器动态注册于静态注册的区别

即静态注册,listener不知道实例的状态,只有在进程通过其连接数据库时才能知道,如果你想使用远程管理数据库就使用静态监听动态注册:listener实时的都知道实例的状态,数据库在关闭的时候会动态的从listener中注销,所以远程管理数据库的启动和停止就不行了. 4,如何判断是静态注册还是动态注册(1) 可以通过配置文件判断 动态注册 SID_LIST_LISTENER =(SID_LIST =(SID_DESC =(PROGRAM = extproc)(SID_NAME = PLSExtP

一次访问问题排查-涉及TNS-03505、ORA-12154、TNS-12560、动态注册、防火墙、tnsping跟踪等

建了一个库,想通过Oracle Net访问,需要配置监听器和tnsnames.ora,接下来碰到一系列的问题... 1. 添加监听器配置,listener.ora文件默认包括: LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) ) ADR_BASE_LISTENER = /opt/app/ora11g 为了新建监听器名称,添加如下:

【转】Oracle 11g Dataguard 参数详解

转自:https://www.jb51.net/article/52269.htm 这篇文章主要介绍了Oracle 11g Dataguard参数详解,包含了独立参数.主库参数.备库参数的详细说明,需要的朋友可以参考下. 注:本文译自<Oracle Data Guard 11g Handbook> Page 78 – Page 88 就Data Guard(后面都写成DG)来说,我们只关注如下三种参数: 1.独立于数据库角色的参数2.数据库角色为primary时的参数3.数据库角色为stand

自己动手写RPC框架到dubbo的服务动态注册,服务路由,负载均衡功能实现

RPC即远程过程调用,它的实现方式有很多,比如webservice等.框架调多了,烦了,没激情了,我们就该问自己,这些框架的作用到底是什么,来找回当初的激情. 一般来说,我们写的系统就是一个单机系统,一个web服务器一个数据库服务,但是当这单台服务器的处理能力受硬件成本的限制,是不能无限的提升处理性能的.这个时候我们使用RPC将原来的本地调用转变为调用远端的服务器上的方法,给系统的处理能力和吞吐量带来了提升. RPC的实现包括客户端和服务端,即服务的调用方和服务的提供方.服务调用方发送rpc请求