您好,登錄后才能下訂單哦!
Oracle 11gR2 RAC 修改監(jiān)聽(tīng)器端口號(hào)的步驟
說(shuō)明:
192.168.188.181 為public ip1
192.168.188.182 為public ip2
192.168.188.183 為vip1
192.168.188.184 為vip2
一、修改 DB 監(jiān)聽(tīng)端口
注意:
1.本文的os是RHEL6.5,DB版本是11.2.0.3.8。
本文非exadata環(huán)境,若是Exadata環(huán)境,請(qǐng)讀Changing Listener Ports On RAC/EXADATA (文檔 ID 1473035.1)
2.本文修改了如下監(jiān)聽(tīng)器的端口號(hào),改為1528
集群監(jiān)聽(tīng)器的端口號(hào)
節(jié)點(diǎn)1本地監(jiān)聽(tīng)器的端口號(hào)
節(jié)點(diǎn)2本地監(jiān)聽(tīng)器的端口號(hào)
3.根據(jù) Changing Listener Ports On RAC/EXADATA (文檔 ID 1473035.1),需要在a quiet time來(lái)修改監(jiān)聽(tīng)器端口號(hào)
修改前的檢查
[grid@hosta admin]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
End points: TCP:1521
[grid@hosta admin]$
1.僅僅在一個(gè)主機(jī)上執(zhí)行
[grid@hosta admin]$ srvctl modify listener -l LISTENER -p "TCP:1528"
2.僅僅在一個(gè)主機(jī)上執(zhí)行
[grid@hosta ~]$ srvctl modify scan_listener -p 1528
3.修改LOCAL_LISTENER僅僅在一個(gè)主機(jī)上執(zhí)行
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
alter system set remote_listener='orcl-scan:1528' scope=both;
5.
在第一個(gè)節(jié)點(diǎn)關(guān)閉本地監(jiān)聽(tīng)
[grid@hosta ~]$ srvctl stop listener -l LISTENER -n hosta
修改第一個(gè)節(jié)點(diǎn)的$GI_HOME/network/admin/endpoints_listener.ora文件,將1521改為1528
[grid@hosta admin]$ cat listener.ora--->該文件中不存儲(chǔ)端口號(hào),因此不用修改。
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 --->該文件中存儲(chǔ)端口號(hào),修改本文件即可。
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]$
啟動(dòng)第一個(gè)節(jié)點(diǎn)本地監(jiān)聽(tīng)
[grid@hosta admin]$ srvctl start listener -l LISTENER -n hosta
在第二個(gè)節(jié)點(diǎn)上進(jìn)行相同的操作。
[grid@hostb ~]$ srvctl stop listener -l LISTENER -n hostb
修改endpoints_listener.ora文件,不再貼出
[grid@hostb admin]$ srvctl start listener -l LISTENER -n hostb
6.確認(rèn)修改效果
[grid@hostb admin]$ srvctl config Listener
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
End points: TCP:1528
二、 修改 ASM 監(jiān)聽(tīng)端口
修改 ASM LOCAL_LISTENER 僅僅在一個(gè)主機(jī)上執(zhí)行
sqlplus / as sysasm;
alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.188.183)(PORT = 1528))' scope=both sid='asm1';
alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.188.184)(PORT = 1528))' scope=both sid='asm2';
之后,應(yīng)用程序連接串以及dblink的定義修改端口號(hào),啟動(dòng)業(yè)務(wù)進(jìn)行測(cè)試即可。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。