关闭

11g R2 rac linstener 监听配置

21406人阅读 评论(1) 收藏 举报
分类:
两个节点host,ipvip ,scan的信息
#eth0-Public IP
162.12.0.1    cqltjcpt1
162.12.0.3    cqltjcpt2

#eth1 PRIVATE IP
192.12.0.1   cqltjcpt1-prvi
192.12.0.3   cqltjcpt2-prvi

#VIP
162.12.0.5   cqltjcpt1-vip
162.12.0.7   cqltjcpt2-vip

#SCAN
162.12.0.9   cqltjcptscan



11G rac中,监听文件默认配置在grid用户下

[root@cqltjcpt2 ~]# su - grid
[grid@cqltjcpt2 ~]$ cd $ORACLE_HOME
[grid@cqltjcpt2 grid]$ cd network/admin/
[grid@cqltjcpt2 admin]$ ll

-rw-r--r-- 1 grid oinstall  189 Jan  7 21:21 endpoints_listener.ora
-rw-r--r-- 1 grid oinstall  350 Jan  7 21:21 listener.ora
drwxr-xr-x 2 grid oinstall 4096 Jan  7 21:04 samples
-rw-r--r-- 1 grid oinstall  205 May 11  2011 shrept.lst
-rw-r--r-- 1 grid oinstall  227 Jan  7 21:21 sqlnet.ora

Oracle 11.2版本后,有一个新的监听文件endpoints_listener.ora被引进,里面的内容是节点的IP和VIP信息

Endpoints_listener.ora 文件的作用是向后兼容11.2版本以前的数据库,DBCA建库时,需要通过获取endpoints的位置信息来配置数据库参数和tnsnames


[grid@cqltjcpt2 admin]$ more endpoints_listener.ora 
LISTENER_CQLTJCPT2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=cqltjcpt2-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=162.12.0.3)(PORT=1521)(IP=FIRST))))               

由于用hosts解析配置本例中没有配置DNS,只有一个scan listener 此时scan监听只运行在Node1上

[grid@cqltjcpt2 admin]$ ps -ef | grep tnslsnr
grid      9840     1  0 Jan07 ?        00:00:22 /u01/oracle/grid/bin/tnslsnr LISTENER -inherit
grid     22674 21922  0 11:08 pts/1    00:00:00 grep tnslsnr

[grid@cqltjcpt2 ~]$ ssh cqltjcpt1
[grid@cqltjcpt1 ~]$ ps -ef | grep  tnslsnr
grid      8211     1  0 Jan07 ?        00:00:44 /u01/oracle/grid/bin/tnslsnr LISTENER -inherit
grid      8380     1  0 Jan07 ?        00:00:02 /u01/oracle/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
grid     22060 22021  0 11:08 pts/1    00:00:00 grep tnslsnr

从ps -ef输出可以看到,无论是scan监听,还是本地监听都是运行在grid用户的oracle_home下


NODE2本地监听指向的是vip地址162.12.0.7 ,因为rac是通过vip对外提供服务


[oracle@cqltjcpt2 ~]$ sqlplus  / as sysdba

SQL> show parameter local_listener

NAME            TYPE        VALUE
--------------- ---------- --------------------------------------------------------------------------------
local_listener  string      (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=162.12.0.7)(PORT=1521))))

remote_listener指向的是scan监听名

SQL> show parameter remote_listener             

NAME               TYPE         VALUE
-----------------  -----------  ------------------------------
remote_listener    string       cqltjcptscan:1521


切换至grid用户

[root@cqltjcpt2 ~]# su - grid
[grid@cqltjcpt2 ~]$ cd $ORACLE_HOME/network/admin
[grid@cqltjcpt2 admin]$ ls
endpoints_listener.ora  listener.ora    samples  shrept.lst  sqlnet.ora

查看监听文件内容
[grid@cqltjcpt2 admin]$ more listener.ora

LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                 

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))             

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON               

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                


最下面两行参数涉及ENABLE_GLOBAL_DYNAMIC_ENDPOINT参数,ENABLE_GLOBAL_DYNAMIC_ENDPOINT参数的作用是允许监听程序接受针对oracle 11.2版本之前未进行动态注册的连接


查看监听状态,可以看到cqltgsqz2实例已经运行
[grid@cqltjcpt2 ~]$ srvctl  status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): cqltjcpt1,cqltjcpt2


[grid@cqltjcpt2 ~]$ lsnrctl status listener

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 08-JAN-2013 10:58:30

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                07-JAN-2013 22:44:03
Uptime                    0 days 12 hr. 14 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/grid/network/admin/listener.ora
Listener Log File         /u01/oracle/app/oracle/diag/tnslsnr/cqltjcpt2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=162.12.0.3)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=162.12.0.7)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "cqlthxqf" has 1 instance(s).
  Instance "cqlthxqf2", status READY, has 1 handler(s) for this service...
Service "cqlthxqfXDB" has 1 instance(s).
  Instance "cqlthxqf2", status READY, has 1 handler(s) for this service...
Service "cqlthxqz" has 1 instance(s).
  Instance "cqlthxqz2", status READY, has 1 handler(s) for this service...
Service "cqlthxqzXDB" has 1 instance(s).
  Instance "cqlthxqz2", status READY, has 1 handler(s) for this service...
Service "cqltjcpt" has 1 instance(s).
  Instance "cqltjcpt2", status READY, has 1 handler(s) for this service...
Service "cqltjcptXDB" has 1 instance(s).
  Instance "cqltjcpt2", status READY, has 1 handler(s) for this service...
The command completed successfully



         

1
0
查看评论
发表评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场

ORACLE RAC 监听配置 (listener.ora tnsnames.ora)

Oracle RAC 监听器的配置与单实例稍有不同,但原理和实现方法基本上是相同的。在Oracle中 tns进程用于为指定网络地址上的一个或多个Oracle 实例提供服务注册,并响应来自客户端对该服务提出的连接请求。一旦连接请求到达,并派生出一个服务器进程建立服务器与用户端之间的连接(专有服务器de...
  • robinson_0612
  • robinson_0612
  • 2012-09-26 14:42
  • 42810

给11gR2 RAC添加LISTENER监听器并静态注册

转载至http://www.askmaclean.com/archives/11gr2-rac-add-listener-static-register.html 之前有同学想要给11gR2的RAC添加LISTENER监听器,查看了listener.ora并发现问题:   ...
  • vic_qxz
  • vic_qxz
  • 2016-11-05 10:24
  • 2415

RAC正确配置监听的方式

1 配置监听和检测配置监听是否正确 此操作只需要在一个节点中操作即可 [grid@qnsdb1 ~]$ srvctl remove listener PRCR-1001 : Resource ora.LISTENER.lsnr does not exist [grid@qnsdb1 ~]$ ...
  • minwang593
  • minwang593
  • 2013-11-22 22:14
  • 494

RAC+DG搭建过程

环境描述   节点1 节点2 Public IP 192.168.77.185 192.168.77.186 Private IP 192.168.56.101 192.168.56.102 VIP 192.168.77.187...
  • lijingkuan
  • lijingkuan
  • 2015-08-25 14:13
  • 2133

11G R2 RAC监听管理---修改端口

11G R2 RAC监听 概述:          机器配置了3个scan ip,但是未配置DNS。 [root@node1 ~]# more /etc/hosts 127.0.0.1  lo...
  • tanqingru
  • tanqingru
  • 2014-06-10 17:24
  • 2204

修改Oracle 11gR2 RAC SCAN监听和本地监听端口

修改SCAN监听的端口将SCAN监听的端口修改为3521,本地监听的端口不变,依然为1521:[root@web1 ~]# srvctl modify scan_listener -p 3521修改后查看监听状态:[grid@web2 ~]$ lsnrctl status LISTENER_SCAN...
  • jiaping0424
  • jiaping0424
  • 2016-05-06 02:37
  • 3332

oracle RAC:监听原理简介

<br />RAC1 RAC2 都需需要配置监听,各自监听自己的 实例;<br />客户端使用SERVER的虚拟IP配置2个监听地址;<br />为什么使用虚拟地址?<br />监听地址使用 VIP(如果没有vip,连接失败节点的process会有一个...
  • xrt95050
  • xrt95050
  • 2010-10-18 14:40
  • 2802

11G R2 RAC监听管理---增加监听1

二。增加监听 修改endpoints_listener.ora --该操作需要两个节点都操作   [grid@node2 admin]$ moreendpoints_listener.ora 增加以下内容:   LSNR2_NODE2=(DESCRIPTION=(A...
  • tanqingru
  • tanqingru
  • 2014-06-10 17:29
  • 1474

11g R2 RAC使用srvctl工具添加监听并手动加入静态注册信息

步骤如下: 检查默认network的network number,红色字体1,一会儿添加监听会用到: [grid@rac121 admin]$ srvctl config network Network exists: 1/10.1.252.0/255.255.255.0/eth0, typ...
  • dbcommando
  • dbcommando
  • 2012-06-19 16:13
  • 6083

11g R2 rac linstener 监听配置

原文地址:http://blog.csdn.net/evils798/article/details/8480194 两个节点host,ipvip ,scan的信息   #eth0-Public IP   162.12.0...
  • cuiyan1982
  • cuiyan1982
  • 2018-01-02 20:26
  • 14
    个人资料
    • 访问:820341次
    • 积分:9036
    • 等级:
    • 排名:第2416名
    • 原创:137篇
    • 转载:45篇
    • 译文:9篇
    • 评论:44条
    简介
    此博客为笔者的DT工作记录,欢迎一起交流学习工作中的点滴,若博客文章观点存在原理的错误、纰漏,笔者非常欢迎各位不保留地指出
    最新评论