Oracle 11gr2修改RAC叢集的scan ip,並處理ORA-12514問題
1.檢視scan ip的狀態資訊
grid@cwgsdb1:~$ srvctl config scan SCAN name: rac-scanip, Network: 1/100.100.100.0/255.255.255.0/ipmp0 SCAN VIP name: scan1, IP: /rac-scanip/100.100.100.219
2.停止scan_listener ,scan
grid@cwgsdb1:~$ srvctl stop scan_listener grid@cwgsdb1:~$ srvctl stop scan
3.確認 scan_listener,scan 的狀態
grid@cwgsdb1:~$ srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is not running grid@cwgsdb1:~$ srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is not running grid@cwgsdb1:~$ crs_stat -t | grep scan ora.scan1.vip ora....ip.type OFFLINE OFFLINE grid@cwgsdb1:~$ crs_stat -t | grep lsnr ora....ER.lsnr ora....er.type ONLINE ONLINE cwgsdb1 ora....N1.lsnr ora....er.type OFFLINE OFFLINE ora....B1.lsnr application ONLINE ONLINE cwgsdb1 ora....B2.lsnr application ONLINE ONLINE cwgsdb2
4.在所有節點中 /etc/hosts 檔案中修改 scan 對應的ip
root@cwgsdb1:~$ cat /etc/hosts # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Internet host table # ::1 cwgsdb1 localhost 100.100.100.215 cwgsdb1 localhost loghost 100.100.100.216 cwgsdb2 100.100.100.217 cwgsdb1-vip 100.100.100.218 cwgsdb2-vip 1.1.1.1 cwgsdb1-priv 1.1.1.2 cwgsdb2-priv 100.100.100.219 rac-scanip root@cwgsdb1:~$ vi /etc/hosts root@cwgsdb1:~$ cat /etc/hosts # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Internet host table # ::1 cwgsdb1 localhost 100.100.100.215 cwgsdb1 localhost loghost 100.100.100.216 cwgsdb2 100.100.100.217 cwgsdb1-vip 100.100.100.218 cwgsdb2-vip 1.1.1.1 cwgsdb1-priv 1.1.1.2 cwgsdb2-priv 100.100.100.103 rac-scanip
5.檢視srvctl命令所在資料夾
grid@cwgsdb1:~$ cd $ORACLE_HOME grid@cwgsdb1:/u01/app/11.2.0/grid$ cd bin/ grid@cwgsdb1:/u01/app/11.2.0/grid/bin$ pwd /u01/app/11.2.0/grid/bin
6. 使用root命令修改scan-ip,即修改為/etc/hosts裡面scan-ip對應的ip
root@cwgsdb1:/u01/app/oracle/product/11.2.0/dbhome_1/bin# cd /u01/app/11.2.0/grid/bin root@cwgsdb1:/u01/app/11.2.0/grid/bin# ./srvctl modify scan -n rac-scanip root@cwgsdb1:/u01/app/11.2.0/grid/bin# ./srvctl config scan SCAN name: rac-scanip, Network: 1/100.100.100.0/255.255.255.0/ipmp0 SCAN VIP name: scan1, IP: /rac-scanip/100.100.100.103
注:-n後面跟的是 /etc/hosts 下 scan 的名稱
7. 啟動scan_listener,scan並檢視狀態
root@cwgsdb1:/u01/app/11.2.0/grid/bin# su - grid Oracle Corporation SunOS 5.11 11.3 September 2015 grid@cwgsdb1:~$ srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is not running grid@cwgsdb1:~$ srvctl start scan_listener grid@cwgsdb1:~$ srvctl start scan PRCC-1014 : scan1 was already running PRCR-1004 : Resource ora.scan1.vip is already running PRCR-1079 : Failed to start resource ora.scan1.vip CRS-5702: Resource 'ora.scan1.vip' is already running on 'cwgsdb2' grid@cwgsdb1:~$ srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node cwgsdb2 grid@cwgsdb1:~$ srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node cwgsdb2 grid@cwgsdb1:~$ srvctl config scan SCAN name: rac-scanip, Network: 1/100.100.100.0/255.255.255.0/ipmp0 SCAN VIP name: scan1, IP: /rac-scanip/100.100.100.103
8. 使用新的scan ip測試連線
提示 ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
使用關鍵字“scan ip ORA-12514”在MOS上查詢解決方案
Top Issues That Cause Troubles with SCAN VIP and Listeners (文件 ID 1373350.1)
Issue #5: Service not getting registered with SCAN listener after failover of the SCAN listener
After SCAN VIP and SCAN listener failover, instance does not register with the SCAN listener. It might happen for only 1 of the scan listener. Client connection gets intermittent ORA-12514 TNS:listener does not currently know of service requested in connect descriptor.
Causes:
1. Unpublished Bug 12659561 after scan listener failover, database instance might not register to the scan listener (refer
Note 12659561.8
), fixed in 11.2.0.3.2, merge patch 13354057 for 11.2.0.2 available for certain platform.
2. Unpublished Bug 13066936 Instance does not register services when scan fails over (refer
Note 13066936.8
)
Solutions:
1) For both above bugs, the workaround is to unregister and register remote listener on the database instance which does not register to a SCAN listener with following steps.
show parameter remote_listener
alter system set remote_listener='';
alter system register;
alter system set remote_listener='<scan>:<port>';
alter system register;
2) Other points to check if service is not registered with SCAN listener:
a. remote_listener and local_listener is defined correctly
b. EZCONNECT is defined in sqlnet.ora, eg: NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
c. SCAN name with 3 IPs should NOT be defined in /etc/hosts, it should be defined in DNS
d. running nslookup <scan> multiple times should display SCAN VIP in round-robin fashion
e. do not set SECURE_REGISTER_<listener> in listener.ora if the class of secure transports (COST) is not configured.
9.嘗試重啟各節點監聽,但問題依然存在
oracle@cwgsdb2:~$ srvctl stop listener -n cwgsdb2 oracle@cwgsdb2:~$ srvctl stop listener -n cwgsdb1 oracle@cwgsdb2:~$ srvctl start listener -n cwgsdb1 oracle@cwgsdb2:~$ srvctl start listener -n cwgsdb2
10.透過修改
remote_listener引數並註冊資料庫解決該問題
SQL> show parameter remote; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_dependencies_mode string TIMESTAMP remote_listener string rac-scanip:1521 remote_login_passwordfile string EXCLUSIVE remote_os_authent boolean FALSE remote_os_roles boolean FALSE result_cache_remote_expiration integer 0 SQL> alter system set remote_listener=''; System altered. SQL> alter system register; System altered. SQL> alter system set remote_listener='rac-scanip:1521'; System altered.
經過驗證,使用新的scan ip可以成功連線資料庫。至此,scan ip修改完成。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31394774/viewspace-2217511/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC修改Scan IP,Public IP的方法Oracle
- Oracle RAC修改public, VIP, SCAN IPOracle
- Oracle Linux 6.7中 Oracle 11.2.0.4 RAC叢集CRS異常處理OracleLinux
- ORACLE RAC 11.2.0.4 FOR RHEL6叢集無法啟動的處理Oracle
- RAC 增加SCAN IP
- Oracle 11g RAC SCAN ip的原理及配置Oracle
- 【RAC】如何修改SCAN IP的IP地址、名稱、埠等資訊
- Oracle 11G 修改scan_ipOracle
- repmgr 叢集雙主問題處理
- 11g RAC 修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
- Oracle 11gR2 RAC 叢集服務啟動與關閉總結Oracle
- redhat7 搭建oracle 11g RAC 問題與處理RedhatOracle
- 【RAC】Oracle rac修改IP地址及埠號命令參考Oracle
- Kafka叢集訊息積壓問題及處理策略Kafka
- RAC磁碟頭損壞問題處理
- oracle RAC 診斷叢集狀態命令Oracle
- Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)Oracle
- RAC修改IP地址
- oracle 11g rac配置em dbconsole ORA-12514Oracle
- 使用並查集處理集合的合併和查詢問題並查集
- 私有IP丟失造成Oracle 12C RAC叢集節點不能啟動Oracle
- oracle rac scan監聽更改埠號Oracle
- 搭建Kubernetes叢集時DNS無法解析問題的處理過程DNS
- Linux 問題處理集錦Linux
- oracle 11.2.0.4 rac叢集等待事件enq: TM - contentionOracle事件ENQ
- Oracle叢集(RAC)時間同步(ntp和CTSS)Oracle
- 【DB寶44】Oracle rac叢集中的IP型別簡介Oracle型別
- Oracle 10g RAC故障處理Oracle 10g
- Oracle RAC 11gR2開啟歸檔Oracle
- ORACLE 11GR2 RAC的網路規劃解析Oracle
- oracle SP2-問題處理Oracle
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- Oracle RAC日常運維-NetworkManager導致叢集故障Oracle運維
- 【ASK_ORACLE】Relink RAC叢集詳細步驟Oracle
- 安裝Oracle 11G RAC 遇到的2個問題——Failed to run "oifcfg" 和 找不到叢集節點OracleAI
- Oracle日常問題處理ORA-04031Oracle
- ORACLE問題處理十個指令碼Oracle指令碼
- 【RAC】Oracle RAC如何修改心跳網路Oracle