Oracle Real Application Clusters (RAC)
• Oracle Real Application Clusters allows oracle database to run any packages or custom application, unchanged across a set of clustered servers. Oracle RAC provides high availability and the most flexible scalability.
• Oracle RAC extends oracle database to store, update and efficiently retrieve data using multiple database instances on different servers at the same time
• The data files that make up the database must be residing in a shared storage that is accessible by all the servers in the cluster.
Oracle RAC System
Establishing Connection to RAC using JDBC
Connecting to an Oracle RAC system is similar to connecting to a single instance of an Oracle database. When connecting to a single Oracle database instance, we specify either the SID or ServiceName of the instance to which you want to connect in the connection string. For example, the following connection string establishes a connection to the database instance
"Host=server1; Port=1521; ServiceName=Accting1"
In a RAC environment, multiple Oracle instances share the same physical data. In addition to the SID or ServiceName for each Oracle instance in the Oracle RAC system, a ServiceName exists for the entire Oracle RAC system. When an application uses the Oracle RAC system's ServiceName, the Oracle RAC system appears to be a single Oracle instance to the application. For example, the following connection string establishes a connection to an Oracle instance in the Oracle RAC system named Accounting:
"Host=server1; Port=1521; ServiceName=Accounting"
The specific instance that is connected to is determined by a number of factors, including which instances are available and the load on those instances. Typically, the application does not need to know which instance to which it is connected.
Oracle RAC systems provide two methods of failover to provide reliable access to data:
• Connection failover. If a connection failure occurs at connect time, the application can fail over the connection to another active node in the cluster. Connection failover ensures that an open route to your data is always available, even when server downtime occurs.
Connection Routing in an Oracle RAC System
• Transparent Application Failover (TAF). If a communication link failure occurs after a connection is established, the connection fails over to another active node. Any disrupted transactions are rolled back, and session properties and server-side program variables are lost. In some cases, if the statement executing at the time of the failover is a Select statement, that statement may be automatically re-executed on the new connection with the cursor positioned on the row on which it was positioned prior to the failover.
Transparent Application Failover
Both connection failover and TAF provide a connection retry feature that allows a connection to be retried automatically until a connection with another RAC node is successfully re-established.
The primary difference between connection failover and TAF is that the former method provides protection for connections at connect time and the latter method provides protection for connections that have already been established. Also, because the state of the transaction must be stored at all times, TAF requires more performance overhead than connection failover.
Load balancing helps distribute new connections in your environment so that no one server is overwhelmed with connection requests. When client load balancing is enabled, connection attempts are made randomly among RAC nodes.
Oracle RAC Net Services
The net services name entry for an Oracle RAC database differs from that of a conventional database. The following is an example of the net services name entry for an Oracle RAC...
Please join StudyMode to read the full document