- Cache Guide
- Using Cache in an Oracle RAC Environment
- Setting Up Cache in an Oracle RAC Environment
Setting Up Cache in an Oracle RAC Environment
You can set up a cache in a TimesTen database to cache data within an Oracle RAC environment.
After you install Oracle RAC and cache, perform the following to set up a cache for an Oracle RAC environment:
- On TimesTen, set the TAF timeout, in minutes, with the
ttCacheConfig
AgentFailoverTimeout
parameter. TheAgentFailoverTimeout
parameter configures how long TAF retries when establishing a connection. TAF attempts to reconnect to the Oracle database for the duration of this timeout. The default is four minutes. If this is not successful, the cache agent restarts and attempts to reconnect with the Oracle database every minute; the replication agent restarts any threads that cannot connect to the Oracle database.If you are using TimesTen Scaleout, you must run the
ttCacheConfig
built-in procedure on every data instance in the database. See ttCacheConfig in the Oracle TimesTen In-Memory Database Reference. - Make sure that the TimesTen daemon, the cache agent, and the following Oracle Database components are started:
-
Oracle Database instances
-
Oracle Database listeners
-
Oracle Database service that is used for cache operations
-
- Verify that the TimesTen
RACCallback
connection attribute is set to 1 (default). See RACCallback in the Oracle TimesTen In-Memory Database Reference. - Use the
DBMS_SERVICE.MODIFY_SERVICE
function or Oracle Enterprise Manager to enable publishing of FAN events. This changes the value in theAQ_HA_NOTIFICATIONS
column of the Oracle DatabaseALL_SERVICES
view toYES
.See Oracle Database PL/SQL Packages and Types Reference for more information about the
DBMS_SERVICE
Oracle Database PL/SQL package. - Enable TAF on the Oracle Database service used for cache operations on TimesTen
with one of the following methods:
-
Create a service for TimesTen in the Oracle Database
tnsnames.ora
file with the following settings:-
LOAD_BALANCE=ON
(optional) -
FAILOVER_MODE=(TYPE=SELECT)
orFAILOVER_MODE=(TYPE=SESSION)
-
-
Use the
DBMS_SERVICE.MODIFY_SERVICE
function to set the TAF failover type.See Oracle Database Net Services Administrator's Guide for more information about enabling TAF.
-
- If you have a TimesTen application that uses the direct driver, link it with a thread library so that it receives FAN notifications. FAN spawns a thread to monitor for failures.