webmethods 连接10g RAC方式 ?

本文探讨了在使用 Oracle 10g RAC 数据库时如何正确配置 JDBC 连接池来实现负载均衡。针对遇到的问题,文中详细介绍了不同版本的 JDBC 驱动设置方法及注意事项。
现在我们开发人员用的下面的方式,但是没有加入 LoadBalancing=true , 不过两个节点还是都有session进来, 昨天发生问题的时候,
都是连接节点1,负载很高, 直到节点1因为 heart beat 问题被自动重新启动Linux了, session才转移到节点2 , 1起来后,又全部回来了,节点2几乎没有用户session ,直到我们又重新启动了节点2 , 系统才恢复正常, 1,2 都有session连接,负载也不是很高 。

CRS-1610:node hou249bbodb3111 (1) at 90% heartbeat fatal, eviction in 0.228 seconds



"jdbc:wm33.gifracle://192.168.7.64:1521;ServiceName=PRD;AlternateServers=(192.168.7.65:1521);LoadBalancing=true"

奇怪的是,我们没有更改连接方式加入LoadBalancing=true , 现在节点1,2 都有session 了 。



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




Issue
I've would like to know what is the url model for JDBC pools when we use a database Oracle 10g RAC.
Same question for repository server.
Resolution
For internal IS JDBC Pools (Core Audit, Process Audit, TN, XRef, Document History), only OEM version of DataDirect ConnectJDBC is supported. The JDBC

connection string to use in this case should be like:


"jdbc:wm33.gifracle://192.168.7.64:1521;ServiceName=PRD;AlternateServers=(192.168.7.65:1521);LoadBalancing=true"



Note: There is an issue with CJDBC 3.4 that would affect all customers using Oracle RAC. Although the correct syntax for setting a URL for Oracle
RAC is as follows:
"jdbc:wm33.gifracle://HOST1:1521;ServiceName=SERVICENAME;AlternateServers=(HOST2:1521);LoadBalancing=true"
with 3.4 if you set the above URL, the IS JDBC pools throw an error. Instead of "AlternateServers", using "AlternateServer" ( Singular) the connection gets

enabled, but the property is just ignored by the Driver. So in effect your customer is exposed to a failure in case the primary RAC node goes down.
This issue does not exist on the 3.3 toolkit. This issue is fixed in 3.5 and 3.6 versions CJDBC.




For webMethods JDBC Adapter, in your case to access to Oracle 10g, you need to use the specific Oracle JDBC Driver, from Oracle itself, and the JDBC

connection string to use should be as:
jdbc33.gifracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.7.64)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.7.65)(PORT=1521)))

(CONNECT_DATA=(SERVICE_NAME=PRD)))





You can use Oracle RAC facility using following in 'Other Properties' when configuring JDBC adapter connection:
Using thin driver something like:
driverType=thin;url=jdbc33.gifracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)

(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=service)))
You can also use the OCI Driver, tnsnames file needs to have the entry for the nodes in the RAC. Then in the connection settings you need the following:
DataSource Class = oracle.jdbc.pool.OracleDataSource therProperties=tnsEntryName=EMPWR2D;driverType=oci

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-678419/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-678419/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值