概述
11gRAC修改端口: http://blog.csdn.net/bamuta/article/details/29863943
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
概述:
机器配置了3个scan ip,但是未配置DNS。本文操作操作将默认的1521端口修改后1523
[root@node1 ~]# more /etc/hosts
127.0.0.1
localhost localhost.localdomain localhost4 localhost4.localdomain4
::1
localhost localhost.localdomainlocalhost6 localhost6.localdomain6
192.168.150.11
node1
192.168.150.12
node2
192.168.150.13
node1-vip
192.168.150.14
node2-vip
172.168.146.101 node1-priv
172.168.146.102 node2-priv
192.168.150.15
scanip
192.168.150.16
scanip
192.168.150.17
scanip
[root@node1 ~]#
11g R2的监听是在grid用户下,
[root@node1 ~]# ps -ef|grep tnslsnr
grid
2983
1
0 17:39 ?
00:00:00/u01/grid/11.2.0/gridhome/bin/tnslsnr LISTENER_SCAN2 -inherit
grid
2985
1
0 17:39 ?
00:00:00/u01/grid/11.2.0/gridhome/bin/tnslsnr LISTENER_SCAN3 -inherit
root
16715 15220
3 18:06 pts/2
00:00:00 grep tnslsnr
grid
31381
1
0 18:04 ?
00:00:00/u01/grid/11.2.0/gridhome/bin/tnslsnr LISTENER –inherit
[root@node2 ~]# ps -ef|grep tnslsnr
root
859 29261
0 18:07 pts/2
00:00:00 grep tnslsnr
grid
15854
1
0 17:45 ?
00:00:00 /u01/grid/11.2.0/gridhome/bin/tnslsnrLISTENER_SCAN1 -inherit
grid
30648
1
0 17:56 ?
00:00:00/u01/grid/11.2.0/gridhome/bin/tnslsnr LISTENER –inherit
一. 修改默认监听端口:
修改endpoints_listener.ora
可以是Grid用户下netca,图形化界面修改。也可以手工修改。
Gridhome/network/admin手工修改:
[grid@node1 admin]$ more endpoints_listener.ora
LISTENER_NODE1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node1-vip)(PORT=1523))(ADDRESS=(PROTOCOL=
TCP)(HOST=192.168.150.11)(PORT=1523)(IP=FIRST))))
# line added by Agent
[grid@node2 admin]# more endpoints_listener.ora
STENER_NODE2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node2-vip)(PORT=1523))(ADDR
LISTENER_NODE2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node2-vip)(PORT=1523))(ADDRESS=(PROTOCOL=
TCP)(HOST=192.168.150.12)(PORT=1523)(IP=FIRST))))
# line added by Agent
修改local_listener和remote_listener
SQL> show parameter local_listener
NAME TYPE VALUE
----------------------------------------------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=192.
168.150.14)(PORT=1521))))
SQL> Altersystem setlocal_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.150.14)(PORT=1523))))'sid='tan2';
Alter system setlocal_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.150.13)(PORT=1521))))'sid='tan1';
SQL> show parameter remote_listener
NAME TYPE VALUE
----------------------------------------------- ------------------------------
remote_listener string scanip:1521
SQL> alter system setremote_listener='scanip:1523';
SQL> altersystem register;
System altered.
重启监听:
#Srvctl stop listener
#Srvctl start listener
[root@node2 ~]# srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s):node2,node1
使用VIP连接
此时使用vip便可以访问集群
TAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.150.13)(PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.150.14)(PORT = 1523))
)
(CONNECT_DATA =
(SERVICE_NAME = tan)
)
)
使用scan IP 连接
但是scan ip 目前还不能连接,需要做以下修改:
[root@node2 ~]# srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running onnode node2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running onnode node1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running onnode node1
[root@node2 ~]# srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port:TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port:TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port:TCP:1521
[root@node2 ~]# srvctlmodify scan_listener -p 1523
[root@node2 ~]# srvctl configscan_listener
SCAN Listener LISTENER_SCAN1 exists. Port:TCP:1523
SCAN Listener LISTENER_SCAN2 exists. Port:TCP:1523
SCAN Listener LISTENER_SCAN3 exists. Port:TCP:1523
[root@node1 ~]#srvctl stop scan_listener
[root@node1 ~]# srvctlstart scan_listener
现在可以使用scan ip进行连接(本例中并未配DNS服务器,所以直接使用了SCAN IP)
TAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL =TCP)(HOST = 192.168.150.15)(PORT = 1523))
(ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.150.16)(PORT = 1523))
(ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.150.17)(PORT = 1523))
)
(CONNECT_DATA =
(SERVICE_NAME = tan)
)
)
最后
以上就是精明战斗机为你收集整理的11G R2 RAC监听管理---修改端口的全部内容,希望文章能够帮你解决11G R2 RAC监听管理---修改端口所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复