Pages

Wednesday, 20 August 2014

Configuring datasources for RAC DB in SOA 10G



Configuring datasources for RAC DB
Fast Connection Failover provides failover for a JDBC
connection to a 10g R1 or 10g R2 RAC database. Upon
failure of a RAC node, Oracle Notification Service (ONS) detects the failure
and an SQL exception is thrown to application code. To enable Fast Connection
Failover on APPHOST1 and APPHOST2:
1.  Open the ORACLE_HOME/opmn/conf/opmn.xml file.
2.   Add the RAC database hostname and remote port
identifiers:
<notification-server>
<port local="6100" remote="6200" request="6003"/>
<ssl enabled="false" wallet-file="$ORACLE_HOME\opmn\conf\ssl.wlt\default"/>
<topology>                                                                                                   <nodeslist="apphost1:5121,apphost2:5121,webhost1:5121,webhost2:5121,soadbhost1:5121, soadbhost2:5121"/>
</topology>
</notification-server>

3.  Save and close the file.
4.  Open the ORACLE_HOME/j2ee/OC4J_SOA/config/data-sources.xml file.
5. Add the RAC node information and enable Fast Connection Failover.
<managed-data-source  jndi-name="jdbc/TestDemoDS" description="Managed
DataSource for TestDemoDS"  connection-pool-name="TestDemoDS
Connection Pool" name="TestDemoDS"/>

<connection-pool name="TestDemoDS Connection
Pool" min-connections="10" max-connections="30" inactivity-timeout="30">

 <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="system" password="welcome1" url="jdbc:oracle:oci:@(DESCRIPTION=(LOAD_BALANCE=off) (ADDRESS=(PROTOCOL=TCP)(HOST=infradbhost1.mycompany.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=infradbhost2.mycompany.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=loon)))"/>
<property name="loginTimeout" value="30"/>
<property name="connectionCachingEnabled" value="true"/>
 <property name="fastConnectionFailoverEnabled" value="true"/>
 </connection-factory>
</connection-pool>
6.   Save and close the file.
7.   Issue this command in ORACLE_HOME/opmn/bin:

      Opmnctl reload

No comments:

Post a Comment