with TimesTen Application-Tier Database Cache
Anconfiguration includes an active cache database, a standby cache database, and optional read-only subscriber databases. The standby cache database receives the updates from the active cache database, and forwards the changes to optional read-only subscriber databases. All updates go directly to the active cache database. The standby cache database is also available for read-only applications, for example a reporting server.
This section describes how you can set up and administer an active standby pair where cache tables are replicated in real-time for high availability. Before you can set up an active standby pair, the TimesTen Cache 11.2.2 software needs to be installed on both the active and standby servers, the connections to the Oracle database need to be configured, and the instance administrator user name must be the same on both installations.
Setting up an Active Standby Pair
Here is an overview of the configuration steps for setting up an active standby pair on a cache database.
|1.||Create a cache database||An initial cache database must be created before an active standby pair can be set up.
This database should contain a user with CACHE_MANAGER or ADMIN privilege
for managing a cache grid, with the required cache groups already defined. Please refer to
Configuration for TimesTen Cache and Cache Grid for more information on how to set up a cache database.
If you have an existing cache database, this step can be skipped.
|2.||Create a user to administer the active standby pair||The cache database must include a user with theprivilege if not yet already existing. This user will be responsible for managing the active standby configuration.|
|3.||Detach database from the cache grid||Use thebuilt-in procedure to detach the database from the cache grid if already attached.|
|4.||Start the cache agent||Use the built-in procedureto start the cache agent process if not already started.|
|5.||Set autorefresh state to paused||If there are any autorefresh cache groups their state must be temporarily set to paused before an active standby pair can be defined. Use the SQL statement to change the autorefresh state|
|6.||Stop the replication agent||Use the built-in procedureto temporary stop the replication agent process if not already stopped.|
|7.||Define an active standby pair replication scheme||Define the configuration of the active standby pair including the hostnames and the data store names of both the Active and Standby Databases using theSQL statement.|
|8.||Set the state of the database to active||Use the built-in procedureto designate the current database as the active database.|
|9.||Start the replication agent||A replication agent process is responsible for replicating data between TimesTen databases.
Use the built-in procedure to start the replication agent.
|10.||Duplicate the active database to the standby server||The standby database is created by cloning the active database to the standby server. Use the utility to duplicate the active database to the standby server.|
|11.||Attach the active database to the cache grid||If global cache groups are defined in the cache database, or if global cache grid operations are required, use thebuilt-in procedure to register the active database into the cache grid, specifying the host names and database names for both the active and standby databases.|
|12.||Start the replication agent on the standby database||The replication agent on the standby is responsible for receiving data from the active database. Use the built-in procedureto start the replication agent process.|
|13.||Start the cache agent on the standby database||Use the built-in procedureto start the cache agent process.|
|14.||Attach the standby database to the cache grid||If global cache groups are defined in the active cache database, or if global cache grid operations are required, use thebuilt-in procedure to register the standby database into the cache grid, specifying the host names and database names for both the active and standby databases.|
|15.||Preload data into cache groups||Use thestatement to preload the cache groups with data from the Oracle database.|
Follow the examples below to set up an active standby pair using the configuration steps described above:
- Setting Up an Active Master Cache Database
- Configuring an Active Standby Pair for the Cache Database
- Creating a Standby Cache Database
Recovering from a failure on the active cache database
Here is an overview of the configuration steps for recovering from a failure on the active cache database. This will perform a failover to the standby database and recover the failed active database. The steps below are appropriate for both asynchronous and return receipt replication.
Follow the example below to failover to a standby database using the steps described above:
Recovering from a Failure on the Active Cache Database example
Dropping an Active Standby Pair
Here is an overview of the configuration steps for removing an active standby pair configuration from a cache database. This will remove the standby cache database, and revert the configuration back to a single cache database.
Follow the example below to remove an active standby pair and to revert back to a standalone cache database by following the steps above:
Dropping an Active Standby Pair Configuration example