您好,登录后才能下订单哦!
小编给大家分享一下Oracle 11gr2如何修改RAC集群的scan ip并处理ORA-12514问题,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
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
grid@cwgsdb1:~$ srvctl stop scan_listener grid@cwgsdb1:~$ srvctl stop 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
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
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
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的名称
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
提示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)
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.
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:~$ 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
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修改完成。
看完了这篇文章,相信你对“Oracle 11gr2如何修改RAC集群的scan ip并处理ORA-12514问题”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。