在测试RAC时,发现连接DB时有大概50%的几率会出现无法连接,报如下错误:
ora-12545;因目标主机或对象不存在,连接失败
在网上搜到解决方法,如下:
sqlplus sys/manager@rac1 as sysdba
SQL>alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.31) (PORT = 1521))' sid='rac1';
sqlplus sys/manager@rac2 as sysdba
SQL>alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.32) (PORT = 1521))' sid='rac2';
测试,未再出现.