Define an Active Standby Pair Configuration

After creating an initial database, you can then define the configuration of the active standby pair, and assign to the current database the active role.

This tutorial uses the pre-defined DSNs repdb1_1121 and repdb2_1121 shipped with TimesTen 11.2.1. The hostnames of the two machines are stacb12 and stach17. repdb1_1121 is the active database on stacb12, and repdb2_1121 on stach17 is the standby database.

3. Define the active standby pair
a. In ttIsql, connect to repdb1_1121 as the replication administrator adm
   
  connect "dsn=repdb1_1121;uid=adm";
   
b. Define an active standby pair schema by using the CREATE ACTIVE STANDBY PAIR statement. The default replication mode for an active standby pair is asynchronous.
   
  create active standby pair repdb1_1121 on "stacb12", repdb2_1121 on "stach17";
   
  Note: The data store names repdb1_1121 and repdb2_1121 used in the CREATE ACTIVE STANDBY statement are not DSNs. They are the filenames defined in the DataStore attribute. The hostnames used in defining the active standby pair should match the values returned by the OS hostname command on the respective servers.
   
c. The ttIsql command repschemes can be used to verify the current replication scheme deployed in the database.
   
  repschemes;
   
 
4. Start the replication agent
a. The replication agent is responsible for replicating data between TimesTen databases. It must be running on both databases in an active standby pair. Use the built-in procedure ttRepStart to start the Replication agent.
   
  call ttrepstart;
5. Set the replication state to Active
a. Use the built-in procedure ttRepStateSet to designate the current database (repdb1_1121) the active state in the active standby pair. ttRepStateGet returns the current replication state of the database.
   
  call ttrepstateset ('active');
call ttrepstateget;
   
 

After setting up an active master database and defining the active standby pair configuration, you can now create the standby database

 

< Previous 1 2 3 Next >