Oracle 11gr2如何修改RAC集群的scan ip并处理ORA-12514问题
小编给大家分享一下Oracle 11gr2如何修改RAC集群的scan ip并处理ORA-12514问题,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
1.查看scan ip的状态信息grid@cwgsdb1:~$srvctlconfigscanSCANname:rac-scanip,Network:1/100.100.100.0/255.255.255.0/ipmp0SCANVIPname:scan1,IP:/rac-scanip/100.100.100.2192.停止scan_listener ,scan
grid@cwgsdb1:~$srvctlstopscan_listenergrid@cwgsdb1:~$srvctlstopscan3.确认 scan_listener,scan 的状态
grid@cwgsdb1:~$srvctlstatusscan_listenerSCANListenerLISTENER_SCAN1isenabledSCANlistenerLISTENER_SCAN1isnotrunninggrid@cwgsdb1:~$srvctlstatusscanSCANVIPscan1isenabledSCANVIPscan1isnotrunninggrid@cwgsdb1:~$crs_stat-t|grepscanora.scan1.vipora....ip.typeOFFLINEOFFLINEgrid@cwgsdb1:~$crs_stat-t|greplsnrora....ER.lsnrora....er.typeONLINEONLINEcwgsdb1ora....N1.lsnrora....er.typeOFFLINEOFFLINEora....B1.lsnrapplicationONLINEONLINEcwgsdb1ora....B2.lsnrapplicationONLINEONLINEcwgsdb24.在所有节点中 /etc/hosts 文件中修改 scan 对应的ip
root@cwgsdb1:~$cat/etc/hosts##Copyright2009SunMicrosystems,Inc.Allrightsreserved.#Useissubjecttolicenseterms.##Internethosttable#::1cwgsdb1localhost100.100.100.215cwgsdb1localhostloghost100.100.100.216cwgsdb2100.100.100.217cwgsdb1-vip100.100.100.218cwgsdb2-vip1.1.1.1cwgsdb1-priv1.1.1.2cwgsdb2-priv100.100.100.219rac-scaniproot@cwgsdb1:~$vi/etc/hostsroot@cwgsdb1:~$cat/etc/hosts##Copyright2009SunMicrosystems,Inc.Allrightsreserved.#Useissubjecttolicenseterms.##Internethosttable#::1cwgsdb1localhost100.100.100.215cwgsdb1localhostloghost100.100.100.216cwgsdb2100.100.100.217cwgsdb1-vip100.100.100.218cwgsdb2-vip1.1.1.1cwgsdb1-priv1.1.1.2cwgsdb2-priv100.100.100.103rac-scanip5.查看srvctl命令所在文件夹
grid@cwgsdb1:~$cd$ORACLE_HOMEgrid@cwgsdb1:/u01/app/11.2.0/grid$cdbin/grid@cwgsdb1:/u01/app/11.2.0/grid/bin$pwd/u01/app/11.2.0/grid/bin6.使用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/binroot@cwgsdb1:/u01/app/11.2.0/grid/bin#./srvctlmodifyscan-nrac-scaniproot@cwgsdb1:/u01/app/11.2.0/grid/bin#./srvctlconfigscanSCANname:rac-scanip,Network:1/100.100.100.0/255.255.255.0/ipmp0SCANVIPname: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-gridOracleCorporationSunOS5.1111.3September2015grid@cwgsdb1:~$srvctlstatusscanSCANVIPscan1isenabledSCANVIPscan1isnotrunninggrid@cwgsdb1:~$srvctlstartscan_listenergrid@cwgsdb1:~$srvctlstartscanPRCC-1014:scan1wasalreadyrunningPRCR-1004:Resourceora.scan1.vipisalreadyrunningPRCR-1079:Failedtostartresourceora.scan1.vipCRS-5702:Resource'ora.scan1.vip'isalreadyrunningon'cwgsdb2'grid@cwgsdb1:~$srvctlstatusscanSCANVIPscan1isenabledSCANVIPscan1isrunningonnodecwgsdb2grid@cwgsdb1:~$srvctlstatusscan_listenerSCANListenerLISTENER_SCAN1isenabledSCANlistenerLISTENER_SCAN1isrunningonnodecwgsdb2grid@cwgsdb1:~$srvctlconfigscanSCANname:rac-scanip,Network:1/100.100.100.0/255.255.255.0/ipmp0SCANVIPname:scan1,IP:/rac-scanip/100.100.100.1038.使用新的scan ip测试连接
提示ORA-12514TNS: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 listenerAfter 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 (referNote 12659561.8), fixed in 11.2.0.3.2, merge patch 13354057 for 11.2.0.2 available for certain platform.2. Unpublished Bug 13066936Instance does not register services when scan fails over (referNote 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.
oracle@cwgsdb2:~$srvctlstoplistener-ncwgsdb2oracle@cwgsdb2:~$srvctlstoplistener-ncwgsdb1oracle@cwgsdb2:~$srvctlstartlistener-ncwgsdb1oracle@cwgsdb2:~$srvctlstartlistener-ncwgsdb210.通过修改remote_listener参数并注册数据库解决该问题
SQL>showparameterremote;NAMETYPEVALUE-----------------------------------------------------------------------------remote_dependencies_modestringTIMESTAMPremote_listenerstringrac-scanip:1521remote_login_passwordfilestringEXCLUSIVEremote_os_authentbooleanFALSEremote_os_rolesbooleanFALSEresult_cache_remote_expirationinteger0SQL>altersystemsetremote_listener='';Systemaltered.SQL>altersystemregister;Systemaltered.SQL>altersystemsetremote_listener='rac-scanip:1521';Systemaltered.
经过验证,使用新的scan ip可以成功连接数据库。至此,scan ip修改完成。
看完了这篇文章,相信你对“Oracle 11gr2如何修改RAC集群的scan ip并处理ORA-12514问题”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。