ITPub博客

首页 > 数据库 > Oracle > weblogic rac10g 配置ha

weblogic rac10g 配置ha

原创 Oracle 作者:wmlm 时间:2009-12-15 16:31:18 0 删除 编辑

How-To Configure and Use Oracle Real Application Clusters (RAC) with Oracle WebLogic Server 10.3

http://www.oracle.com/technology/products/weblogic/howto/rac/index.html

[@more@]

How-To Configure and Use Oracle Real Application Clusters (RAC) with Oracle WebLogic Server 10.3

要点

服务器端tnsnames.ora

HASERVICE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = apemrac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = apemrac2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MYHASERVICE.apemrac.au.oracle.com)
)
)

test.sh

#!/bin/sh
count=0
while [ $count -lt 5 ] # Set up a loop control
do # Begin the loop
count=`expr $count + 1` # Increment the counter
sqlplus -s juser/juser@HASERVICE @test.sql
done

test.sql

col "Instance" format a20
col "Host" format a20
col "Service Name" format a20
select sys_context('userenv', 'instance_name') "Instance",
sys_context('userenv', 'server_host') "Host",
sys_context('userenv', 'service_name') "Service Name"
from dual

/
exit;

Creating the required Data Sources

Create Data Source #1 for first Node
Here let’s connect to the first instance in our RAC node that will be "orcl1" with an URL as following example.

jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = apemrac1-vip)(PORT = 1521))

(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MYHASERVICE.apemrac.au.oracle.com)

(INSTANCE_NAME = orcl1)))

Create data Source #2 for second Node
Repeat the steps above but this time select the second node in the RAC cluster. This data source will be called "Node2DS" and once again be targeted to the managed server "lemon"

jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = apemrac2-vip)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.apemrac.au.oracle.com)
(INSTANCE_NAME = orcl2)))

Create the Multi Data Source

5


jdbc/racDS
Load-Balancing
Node1DS,Node2DS

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

上一篇: rac ora-12545
请登录后发表评论 登录
全部评论

注册时间:2008-04-08

  • 博文量
    398
  • 访问量
    3716794