10g RAC 修改监听端口
2014-06-11 14:04
477 查看
11gRAC增加监听1: http://blog.csdn.net/bamuta/article/details/29865023
11gRAC增加监听2: http://blog.csdn.net/bamuta/article/details/30029437
10gRAC修改端口 http://blog.csdn.net/bamuta/article/details/30050833
10g RAC监听
10gRAC的监听相对较为简单,和单实例配置差不多,在oracle用户下,oracle home下配置。10g修改端口:
下面步骤将1521修改为1522修改listener(两个节点都需要改)
o10n2->cd/oracle/product/10.2.0/db_1/network/admin/
o10n2->vi listener.ora
SID_LIST_LISTENER_O10N2 = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /oracle/product/10.2.0/db_1) (PROGRAM = extproc) ) ) LISTENER_O10N2 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = o10n2-vip)(PORT = 1522)(IP = FIRST)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.150.72)(PORT = 1522)(IP =FIRST)) ) )
查看local_listener
SQL> show parameter localNAME TYPE VALUE
----------------------------------------------- ------------------------------
local_listener string LISTENER_BAMUTA1
SQL> show parameter remote_listener
NAME TYPE VALUE
----------------------------------------------- ------------------------------
remote_listener string LISTENERS_BAMUTA
修改tnsnames.ora里的端口(两个节点上都要改)
LISTENER_BAMUTA2 = (ADDRESS = (PROTOCOL = TCP)(HOST = o10n2-vip)(PORT = 1522)) LISTENER_BAMUTA1 = (ADDRESS = (PROTOCOL = TCP)(HOST = o10n1-vip)(PORT = 1522)) LISTENER_O10N2 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = o10n2-vip)(PORT = 1522)(IP = FIRST)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.150.72)(PORT = 1522)(IP =FIRST)) ) )
两个节点上启动新的端口:
o10n2->lsnrctl
LSNRCTL> setcurrent_listener LISTENER_O10N2
Current Listener is LISTENER_O10N2
--在另1个节点1个可以用set current_listener LISTENER_O10N1命令启动。
LSNRCTL> start
o10n2->lsnrctl status LISTENER_O10N2
LSNRCTL for Linux: Version 10.2.0.4.0 -Production on 11-JUN-2014 13:51:54 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=o10n2-vip)(PORT=1522)(IP=FIRST))) STATUS of the LISTENER ------------------------ Alias LISTENER_O10N2 Version TNSLSNR for Linux: Version10.2.0.4.0 - Production Start Date 11-JUN-2014 12:00:57 Uptime 0 days 1 hr. 50 min. 57 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /oracle/product/10.2.0/db_1/network/log/listener_o10n2.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.82)(PORT=1522))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.72)(PORT=1522))) Services Summary... Service "PLSExtProc" has 1instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) forthis service... Service "aa" has 2 instance(s). Instance "bamuta1", status READY, has 1 handler(s) for thisservice... Instance "bamuta2", status READY, has 2 handler(s) for thisservice... Service "bamuta" has 2instance(s). Instance "bamuta1", status READY, has 1 handler(s) for thisservice... Instance "bamuta2", status READY, has 2 handler(s) for thisservice... Service "bamutaXDB" has 2instance(s). Instance "bamuta1", status READY, has 1 handler(s) for thisservice... Instance "bamuta2", status READY, has 1 handler(s) for thisservice... Service "bamuta_XPT" has 2instance(s). Instance "bamuta1", status READY, has 1 handler(s) for thisservice... Instance "bamuta2", status READY, has 2 handler(s) for thisservice... Service "ocm2" has 2 instance(s). Instance "bamuta1", status READY, has 1 handler(s) for thisservice... Instance "bamuta2", status READY, has 2 handler(s) for thisservice... The command completed successfully
注意,此时1522已经启动好了,并且可以连接了,但是1521也还是可以连接的。
o10n1->lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 -Production on 11-JUN-2014 13:55:33 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version10.2.0.4.0 - Production Start Date 11-JUN-2014 13:55:30 Uptime 0 days 0 hr. 0 min. 3 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=o10n1)(PORT=1521))) The listener supports no services The command completed successfully
如果需要关掉原来的1521端口,可以通过lsnrctl stop关掉。但是现在不能用srvctl关掉。这样会关掉1522的监听,且并不会关掉1521的端口。
[root@o10n1 bin]# srvctlstop listener -n o10n1
[root@o10n1 bin]# srvctl stop listener -no10n2
相关文章推荐
- Oracle 11gR2 RAC修改监听默认端口
- 11G R2 RAC监听管理---修改端口
- Centos 7 修改ssh的监听端口
- 10g_rac 修改priv,vip,public
- oracle 10g rac 修改public ip、vip和private ip
- 【PostgreSQL-9.6.3】修改监听的IP和端口
- 【实验】【LISTENER】修改LISTENER的监听端口为1526
- 阿里云主机(Ubuntu16.04 64位)安装tomcat8并修改监听端口
- 修改Oracle 11gR2 RAC SCAN监听和本地监听端口
- weblogic 修改监听端口
- How to Modify SCAN Setting or SCAN Listener Port after Installation 如何修改SCAN的设置和SCAN监听的端口
- RAC环境下修改IP ―― 10G
- linux下用命令修改oracle监听端口,无序重启。
- oracle修改监听端口
- 修改数据库的监听端口1522
- Oracle 10g RAC修改IP/VIP地址示例
- 修改oracle数据库监听端口号
- Oracle数据库修改LISTENER的监听端口
- 修改10G RAC public IP && VIP
- oracle中修改数据库实例监听的ip和端口