1、首先制作一个批处理,对集群IP进行DNS设置:
1 @echo off
2 if not exist hosts goto WNT
3 echo 192.168.2.5 HIS_S0 >>C:\windows\hosts
4 echo 192.168.2.6 HIS_S1 >>C:\windows\hosts
5 goto END
6 :WNT
7 echo 192.168.2.5 HIS_S0 >>%systemroot%\system32\drivers\etc\hosts
8 echo 192.168.2.6 HIS_S1 >>%systemroot%\system32\drivers\etc\hosts
9 :END
10 echo Finished!
11 pause > nul
12 cls
2、配置一个URL来连接这个集群,集群的服务名为HIS:
1 jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=HIS_S0)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=HIS_S1)(PORT=1521))(LOAD_BALANCE=yes))(CONNECT_DATA=(SERVICE_NAME=HIS)))
posted on 2006-06-07 09:04
rox 阅读(507)
评论(1) 编辑 收藏 所属分类:
DB