现在我们开发人员用的下面的方式,但是没有加入 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:wm racle://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:wm racle://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:wm racle://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:
jdbc racle: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=jdbc racle: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
都是连接节点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:wm racle://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:wm racle://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:wm racle://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:
jdbc racle: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=jdbc racle: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/