扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:中国IT实验室 来源:中国IT实验室 2007年10月1日
关键字: ORACLE
在本页阅读全文(共2页)
3.tnsnames的研究
以下时服务RAC.SHIMU.COM.CN的tnsnames的配置
# tnsnames.ora.db2pub Network Configuration File: /oracle/10g2/network/admin/tnsnames.ora.db2pub
# Generated by Oracle configuration tools.
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.158.0.60)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.59)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.SHIMU.COM.CN)
)
)
LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.60)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.59)(PORT = 1521))
)
RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.59)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.SHIMU.COM.CN)
(INSTANCE_NAME = RAC2)
)
)
RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = VIPDB.SHIMU.COM.CN)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.SHIMU.COM.CN)
(INSTANCE_NAME = RAC1)
)
)
哈哈,终于发现秘密了,所有cluster的listener和service都是监听VIP的地址。。。
呵呵。等着好戏吧。。。
4.故障测试
停掉node1,此时所有的连接都正常工作,检测node2的网络装况,呵呵,果不出所然:
[root@DB2PUB root]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:50:56:40:00:5B
inet addr:192.168.0.62 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:960 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:284407 (277.7 Kb) TX bytes:4017 (3.9 Kb)
Interrupt:9 Base address:0x10c0
eth0:1 Link encap:Ethernet HWaddr 00:50:56:40:00:5B
inet addr:192.168.0.59 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:734 errors:0 dropped:0 overruns:0 frame:0
TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:268965 (262.6 Kb) TX bytes:9534 (9.3 Kb)
Interrupt:9 Base address:0x10c0
eth0:2 Link encap:Ethernet HWaddr 00:50:56:40:00:5B
inet addr:192.168.0.60 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:734 errors:0 dropped:0 overruns:0 frame:0
TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:268965 (262.6 Kb) TX bytes:9534 (9.3 Kb)
Interrupt:9 Base address:0x10c0
eth1 Link encap:Ethernet HWaddr 00:50:56:40:00:5C
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:734 errors:0 dropped:0 overruns:0 frame:0
TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:268965 (262.6 Kb) TX bytes:9534 (9.3 Kb)
Interrupt:14 Base address:0x10e0
此时node2立即接管node1的VIP网络地址,所有的连接透明的连到了后台!!
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者