+

Search Tips   |   Advanced Search

Set a simple RAC configuration in an appserver cluster


Oracle Real Application Cluster (RAC) is a "share-everything" database architecture that can provide high availability and load balancing. A typical configuration for an Oracle RAC contains two or more Oracle RAC nodes that are clustered together and share the same storage.

This figure depicts a typical RAC physical topology in a cluster environment for the appserver, and both the failover and load balancing are enabled:



In the figure above, the appserver cluster consists of two members: cluster-member1 and cluster-member2. The Oracle RAC physical configuration contains two nodes: rac-node1 and rac-node2. The RAC nodes can be located in the same physical machine with the cluster members, or they could be placed in entirely different machines. The actual placement does not impact the fundamental qualities of the services provided by RAC. To achieve both high availability and load-balancing, we can specify the Oracle data source URL for both cluster members in the appserver with the required properties.

 

  1. Navigate to the Oracle data source. Click Resources > JDBC > Data sources > oracle_data_source . If we don't already have an Oracle data source, create a new data source by clicking New and completing the wizard. For the URL, substitute the properties in the next step.

  2. Set the URL for the Oracle database with the required configuration parameters.

    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST= 
                      (ADDRESS=(PROTOCOL=TCP)(HOST= rac-node1)(PORT=1521)) 
                      (ADDRESS=(PROTOCOL=TCP)(HOST= rac-node2)(PORT=1521)) 
                      (FAILOVER=on)(LOAD_BALANCE=on) 
                      (CONNECT_DATA=(SERVER=DEDICATED) 
                      (SERVICE_NAME=<service_name>))) 
    

    Supported configurations: Be aware of these configuration options:

    • If not using Oracle services, then service_name will be the database name in the example. If using Oracle services, then service_name will be the name of the services.

    • The example has FAILOVER and LOAD_BALANCE turned on. To turn one or both of these features off, change on to off in the above example.

    sptcfg

  3. Click Apply or OK.

 

Related tasks


Set Oracle connection caching in the appserver
Set two-phase commit distributed transactions with Oracle RAC
Set Oracle Real Application Cluster (RAC) with the appserver
Set a JDBC provider and data source