• 欢迎访问V小白网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站,欢迎加入V小白 暂无QQ群
  • 欢迎访问V小白网站,这是第二个滚动条

Oracle RAC 修改scan ip后连接报错ORA-12514

DB数据库 admin 2019年6月24日 08:54 502 1 个评论

数据库版本:11.2.0.4 两节点RAC


 


操作系统版本:Redhat linux6.5


 


 


Scan IP修改前:10.2.110.113 修改后10.2.110.114


Scan解析使用本地hosts文件。


 


修改方法:


 


1,查看当前scan ip的状态信息


[root@zg1 ~]# srvctl config scan


SCAN name: zg-scan, Network: 1/10.2.110.0/255.255.254.0/eth0


SCAN VIP name: scan1, IP: /zg-scan/10.2.110.113


2,停止scan_listener和scan


[root@zg1 ~]# srvctl stop scan_listener


[root@zg1 ~]# srvctl stop scan


3,确认scan_listener和scan的状态


[root@zg1 ~]# srvctl status scan


SCAN VIP scan1 is enabled


SCAN VIP scan1 is not running


[root@zg1 ~]# srvctl status scan_listener


SCAN Listener LISTENER_SCAN1 is enabled


SCAN listener LISTENER_SCAN1 is not running


4,修改所有节点的/etc/hosts文件中scan ip地址。


#scan ip


10.2.110.114 zg-scan


[root@zg1 ~]# srvctl modify scan -n zg-scan


5,开启scan_listener和scan


[root@zg1 ~]# srvctl start scan


[root@zg1 ~]# srvctl start scan_listener


 


 


 


6,验证是否修改成功


 


[root@zg1 ~]# srvctl config scan


SCAN name: zg-scan, Network: 1/10.2.110.0/255.255.254.0/eth0


SCAN VIP name: scan1, IP: /zg-scan/10.2.110.114


[grid@zg2 ~]$ srvctl status scan


SCAN VIP scan1 is enabled


SCAN VIP scan1 is running on node zg2


[grid@zg2 ~]$ srvctl status scan_listener


SCAN Listener LISTENER_SCAN1 is enabled


SCAN listener LISTENER_SCAN1 is running on node zg2


[grid@zg2 admin]$ lsnrctl status LISTENER_SCAN1


 


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-JUL-2018 03:23:44


 


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


 


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))


STATUS of the LISTENER


------------------------


Alias                     LISTENER_SCAN1


Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production


Start Date                11-JUL-2018 03:09:28


Uptime                    0 days 0 hr. 14 min. 16 sec


Trace Level               off


Security                  ON: Local OS Authentication


SNMP                      OFF


Listener Parameter File   /oracle/app/11.2.0/grid/network/admin/listener.ora


Listener Log File         /oracle/app/grid/diag/tnslsnr/zg2/listener_scan1/alert/log.xml


Listening Endpoints Summary...


  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))


  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.2.110.114)(PORT=1521)))


The listener supports no services


The command completed successfully


 


DB实例并没有注册到scan监听上面。应用连接会报错ORA-12514 TNS:listener does not currently know of service requested in connect descriptor


 


查看DB实例的remote_listener 参数,没有问题


SQL> show parameter remote


 


NAME                                 TYPE        VALUE


------------------------------------ ----------- ------------------------------


remote_dependencies_mode             string      TIMESTAMP


remote_listener                      string      zg-scan:1521


手动注册:alter system register;


依旧没有解决。


 


7,问题最终解决


 


后证实是一个bug,最终解决如下:


[oracle@zg2 ~]$ sqlplus / as sysdba


SQL> alter system set remote_listener='';


System altered.


SQL> alter system register;


System altered.


SQL> alter system set remote_listener='zg-scan:1521';


System altered.


SQL> exit


[grid@zg2 ~]$ lsnrctl status LISTENER_SCAN1


 


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-JUL-2018 04:27:33


 


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


 


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))


STATUS of the LISTENER


------------------------


Alias                     LISTENER_SCAN1


Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production


Start Date                11-JUL-2018 03:09:28


Uptime                    0 days 1 hr. 18 min. 4 sec


Trace Level               off


Security                  ON: Local OS Authentication


SNMP                      OFF


Listener Parameter File   /oracle/app/11.2.0/grid/network/admin/listener.ora


Listener Log File         /oracle/app/grid/diag/tnslsnr/zg2/listener_scan1/alert/log.xml


Listening Endpoints Summary...


  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))


  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.2.110.114)(PORT=1521)))


Services Summary...


Service "zg" has 2 instance(s).


  Instance "zg1", status READY, has 1 handler(s) for this service...


  Instance "zg2", status READY, has 1 handler(s) for this service...


Service "zgXDB" has 2 instance(s).


  Instance "zg1", status READY, has 1 handler(s) for this service...


  Instance "zg2", status READY, has 1 handler(s) for this service...


Service "zg_p" has 2 instance(s).


  Instance "zg1", status READY, has 1 handler(s) for this service...


  Instance "zg2", status READY, has 1 handler(s) for this service...


The command completed successfully



V小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Oracle RAC 修改scan ip后连接报错ORA-12514
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到
1个小伙伴在吐槽
  1. 签到成功!签到时间:2018-09-21 10:14:31,每日打卡,生活更精彩哦~
    115.*.*.2302018年9月21日 10:14 (2 年,4 月)回复