织梦CMS - 轻松建站从此开始!

欧博ABG官网-欧博官方网址-会员登入

欧博abg11G R2 RAC添加监听

时间:2024-06-08 20:41来源: 作者:admin 点击: 46 次
步骤如下: 检查默认network的network number,红色字体1,一会儿添加监听会用到: 查看srvctl添加监听的语法: 添加监听:名称: LISTENER4 端口号:1524 创建完后会在配置文件endpoints_listener.ora和listener.ora中添加记录信息:

检查默认network的network number,红色字体1,欧博abg一会儿添加监听会用到:

[grid@rac121 admin]$ srvctl config network Network exists: 1/10.1.252.0/255.255.255.0/eth0, type static

查看srvctl添加监听的语法:

[grid@rac121 admin]$ srvctl add listener -h Adds a listener configuration to the Oracle Clusterware. Usage: srvctl add listener [-l <lsnr_name>] [-s] [-p "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-o <oracle_home>] [-k <net_num>]     -l <lsnr_name>           Listener name (default name is LISTENER) #监听名称     -o <oracle_home>         ORACLE_HOME path (default value is CRS_HOME) #grid的HOME     -k <net_num>             network number (default number is 1) #最开始查看的网络号     -s                       Skip the checking of ports     -p "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"   Comma separated tcp ports or listener endpoints #要添加的端口号     -h                       Print usage

添加监听:名称: LISTENER4  端口号:1524   

[grid@rac121 ~]$ srvctl add listener -l LISTENER4 -o $ORACLE_HOME -p 1524 -k 1 [grid@rac121 ~]$ srvctl start listener -l LISTENER4

创建完后会在配置文件endpoints_listener.ora和listener.ora中添加记录信息:

[grid@rac121 admin]$ ls endpoints_listener.ora             listener1206183PM1248.bak  listener.ora             samples     sqlnet1206199AM0038.bak endpoints_listener.ora.bak.rac121  listener1206199AM0038.bak  listener.ora.bak.rac121  shrept.lst  sqlnet.ora

查看添加 的信息:两个文件听红色字体部分

[grid@rac121 admin]$ cat listener.ora LISTENER4=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER4))))          # line added by Agent NEW_RACDB_LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=NEW_RACDB_LISTENER))))                # line added by Agent # listener.ora Network Configuration File: /oradata/oracleapp/11.2.0/grid/network/admin/listener.ora # Generated by Oracle configuration tools. [grid@rac121 admin]$ cat endpoints_listener.ora LISTENER4_RAC121=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac121-vip)(PORT=1524))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.252.121)(PORT=1524)(IP=FIRST))))          # line added by Agent NEW_RACDB_LISTENER_RAC121=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac121-vip)(PORT=1523))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.252.121)(PORT=1523)(IP=FIRST))))         # line added by Agent RACDB_LISTENER_RAC121=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac121-vip)(PORT=1522))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.252.121)(PORT=1522)(IP=FIRST))))             # line added by Agent LISTENER_RAC121=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac121-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.252.121)(PORT=1521)(IP=FIRST))))           # line added by Agent

到此完成了监听的添加,欧博官网再添加静态注册信息,vi listener.ora文件,在里面添加如下内容:

SID_LIST_LISTENER4 = #对应的监听名   (SID_LIST =     (SID_DESC =       (GLOBAL_DBNAME = RACDB)       (ORACLE_HOME = /oradata/oracleapp/11.2.0/grid)       (SID_NAME = RACDB1) #节点对应的SID     )   )

重启监听即完成静态注册:

[grid@rac121 admin]$ srvctl stop listener -l LISTENER4 [grid@rac121 admin]$ srvctl start listener -l LISTENER4 [grid@rac121 admin]$ lsnrctl status LISTENER4 LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 19-JUN-2012 15:48:47 Copyright (c) 1991, 2011, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER4))) STATUS of the LISTENER ------------------------ Alias                     LISTENER4 Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date                19-JUN-2012 15:48:35 Uptime                    0 days 0 hr. 0 min. 11 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   /oradata/oracleapp/11.2.0/grid/network/admin/listener.ora Listener Log File         /oradata/oracleapp/11.2.0/grid/log/diag/tnslsnr/rac121/listener4/alert/log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER4)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.252.121)(PORT=1524)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.252.75)(PORT=1524))) Services Summary... Service "RACDB" has 1 instance(s).   Instance "RACDB1", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully [grid@rac121 admin]$ 

查看所有的监听状态:

grid@rac121 admin]$ srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): rac121,rac122 Listener LISTENER4 is enabled Listener LISTENER4 is running on node(s): rac121,rac122 Listener NEW_RACDB_LISTENER is enabled Listener NEW_RACDB_LISTENER is running on node(s): rac121,rac122 Listener RACDB_LISTENER is enabled Listener RACDB_LISTENER is running on node(s): rac121,rac122

查看各个监听的配置:

[grid@rac121 admin]$ srvctl config listener -a  Name: LISTENER Network: 1, Owner: grid Home: <CRS home>   /oradata/oracleapp/11.2.0/grid on node(s) rac122,rac121 End points: TCP:1521 Name: LISTENER4 Network: 1, Owner: grid Home: <CRS home>   /oradata/oracleapp/11.2.0/grid on node(s) rac122,rac121 End points: TCP:1524 Name: NEW_RACDB_LISTENER Network: 1, Owner: grid Home: <CRS home>   /oradata/oracleapp/11.2.0/grid on node(s) rac122,rac121 End points: TCP:1523 Name: RACDB_LISTENER Network: 1, Owner: grid Home: <CRS home>   /oradata/oracleapp/11.2.0/grid on node(s) rac122,rac121 End points: TCP:1522

到此就利用srvctl管理工具完成了添加新监听和静态注册的任务。

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2024-12-31 01:12 最后登录:2024-12-31 01:12
栏目列表
推荐内容