Rac 如何修改默认监听端口号
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Rac 如何修改默认监听端口号相关的知识,希望对你有一定的参考价值。
参考技术AOracle 11gR2 RAC 修改监听器端口号的步骤
参考自:
Changing Listener Ports On RAC/EXADATA (文档 ID 1473035.1)
注意:
1.本文的os是RHEL6.5,DB版本是11.2.0.3.8。
本文非exadata环境,若是Exadata环境,请读Changing Listener Ports On RAC/EXADATA (文档 ID 1473035.1)
2.本文修改了如下监听器的端口号,改为1528
集群监听器的端口号
节点1本地监听器的端口号
节点2本地监听器的端口号
3.根据 Changing Listener Ports On RAC/EXADATA (文档 ID 1473035.1),需要在a quiet time来修改监听器端口号
修改前的检查
[html] view plain copy
[grid@hosta admin]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
End points: TCP:1521
[grid@hosta admin]$
1.仅仅在一个主机上执行
[html] view plain copy
[grid@hosta admin]$ srvctl modify listener -l LISTENER -p "TCP:1528"
2.仅仅在一个主机上执行
[html] view plain copy
[grid@hosta ~]$ srvctl modify scan_listener -p 1528
3.修改LOCAL_LISTENER仅仅在一个主机上执行
[html] view plain copy
alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.188.183)(PORT = 1528))' scope=both sid='orcl1';
alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.188.184)(PORT = 1528))' scope=both sid='orcl2';
4.修改remote_listener
[html] view plain copy
alter system set remote_listener='orcl-scan:1528' scope=both;
5.
在第一个节点关闭本地监听
[html] view plain copy
[grid@hosta ~]$ srvctl stop listener -l LISTENER -n hosta
修改第一个节点的$GI_HOME/network/admin/endpoints_listener.ora文件,将1521改为1528
[html] view plain copy
[grid@hosta admin]$ cat listener.ora--->该文件中不存储端口号,因此不用修改。
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
[grid@hosta admin]$ cat endpoints_listener.ora --->该文件中存储端口号,修改本文件即可。
LISTENER_HOSTA=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hosta-vip)(PORT=1528))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.188.181)(PORT=1528)(IP=FIRST)))) # line added by Agent
[grid@hosta admin]$
启动第一个节点本地监听
[html] view plain copy
[grid@hosta admin]$ srvctl start listener -l LISTENER -n hosta
在第二个节点上进行相同的操作。
[html] view plain copy
[grid@hostb ~]$ srvctl stop listener -l LISTENER -n hostb
修改endpoints_listener.ora文件,不再贴出
[grid@hostb admin]$ srvctl start listener -l LISTENER -n hostb
6.确认修改效果
[html] view plain copy
[grid@hostb admin]$ srvctl config Listener
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
End points: TCP:1528
以上是关于Rac 如何修改默认监听端口号的主要内容,如果未能解决你的问题,请参考以下文章