How to Set up an Active Master Cache Database

This tutorial, will make use of the pre-defined DSN cachedb1_1121 shipped with TimesTen 11.2.1. The hostnames of the two machines in the examples are stacb12 and stach17. cachedb1_1121 is the active cache database on stacb12, and cachedb2_1121 on stach17 is the standby cache database.

In order to set up an active standby database, you must first create a cache database which will be the initial active master database. This database must include a user with ADMIN privilege, and cache groups owned an application user.

1. Create a cache database
a. Follow the tutorials in Configuration for In-Memory Database Cache to create an initial cache database cachedb1_1121. The cache database contains 2 cache groups, a dynamic updatable global cache group based on the Oracle hr.employees and hr.job_history tables, and a read only local cache group on the hr.departments table.

Complete the following tutorials:

Required configuration on the Oracle database
How to set up a cache database
How to add cache groups to a cache database*
   
  * Step 4 "Attach the Cache Database to the Cache Grid", and step 5 "Preload data into Cache Groups" are not required here. When setting up an active standby pair, the grid attach and the load cache group steps should be performed after the standby database has been created. See steps 11, 14 and 15 in this tutorial.
   
b. Create a DSN for the standby cache database on the standby server. This DSN should have the same attribute definitions as the active cache database. In our example, we will use cachedb2_1121 as the standby database DSN.

Log in to server 2 (stach17) as the instance administrator, create a DSN called cachedb2_1121 with the same attribute settings as cachedb1_1121.
   
  If necessary, refer to the section Setting up Data Source Name for more information.
2. Create a database user to administer the replication operations
a. Create a database user and assign him the role of the replication administrator, this user is responsible for setting up and managing the Active Standby Pair replication. Instead of creating a new database user, you can also grant the required privilege to cacheadm , this user will then be responsible for managing both Replication and Cache operations.

Using ttisql, log into the database cachedb1_1121 as the Instance administrator and execute:

GRANT admin TO cacheadm;

Note: In the previous In-Memory Database Cache example, we have already granted the ADMIN privilege to cacheadm, hence this step is not needed.

After setting up an initial cache database, you can now define the configuration of the Active Standby Pair and assign the current database as the Active database.

 

1 2 3 Next >