环境: Oracle 11gR2 RAC, CentOS 5.6
通过SCAN访问RAC database, 不时出现ORA-12543: TNS:destination host unreachable,经查只有一个scan listener可以访问。
[oracle@rac7 ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.56.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.56.10/192.168.56.10
然而
[root@rac7 ~]# vi /var/named/localdomain.zone
$TTL 86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
rac5 IN A 192.168.56.248
rac7 IN A 192.168.56.247
rac5-priv IN A 192.168.56.5
rac7-priv IN A 192.168.56.7
rac5-vip IN A 192.168.56.105
rac7-vip IN A 192.168.56.107
rac-scan IN A 192.168.56.10
rac-scan IN A 192.168.56.11
rac-scan IN A 192.168.56.12
有三个scan ip地址
更改操作如下:
srvctl stop scan_listener
srvctl stop scan
切换到root用户
/u01/app/grid/bin/srvctl modify scan -n rac-scan
/u01/app/grid/bin/srvctl config scan
/u01/app/grid/bin/ srvctl modify scan_listener -u
/u01/app/grid/bin/srvctl config scan_listener
/u01/app/grid/bin/srvctl srvctl start scan_listener
再切换到oracle用户
srvctl status scan
srvctl status scan_listener
测试 sqlplus system/oracle@RAC-SCAN:1521/racdb.localdomain
然后多次查看select instance_name from v$instance;
可知instance_name会变化 。
通过SCAN访问RAC database, 不时出现ORA-12543: TNS:destination host unreachable,经查只有一个scan listener可以访问。
[oracle@rac7 ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.56.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.56.10/192.168.56.10
然而
[root@rac7 ~]# vi /var/named/localdomain.zone
$TTL 86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
rac5 IN A 192.168.56.248
rac7 IN A 192.168.56.247
rac5-priv IN A 192.168.56.5
rac7-priv IN A 192.168.56.7
rac5-vip IN A 192.168.56.105
rac7-vip IN A 192.168.56.107
rac-scan IN A 192.168.56.10
rac-scan IN A 192.168.56.11
rac-scan IN A 192.168.56.12
有三个scan ip地址
更改操作如下:
srvctl stop scan_listener
srvctl stop scan
切换到root用户
/u01/app/grid/bin/srvctl modify scan -n rac-scan
/u01/app/grid/bin/srvctl config scan
/u01/app/grid/bin/ srvctl modify scan_listener -u
/u01/app/grid/bin/srvctl config scan_listener
/u01/app/grid/bin/srvctl srvctl start scan_listener
再切换到oracle用户
srvctl status scan
srvctl status scan_listener
测试 sqlplus system/oracle@RAC-SCAN:1521/racdb.localdomain
然后多次查看select instance_name from v$instance;
可知instance_name会变化 。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16582684/viewspace-740035/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16582684/viewspace-740035/