Making Other Changes to an Active Standby Pair

You must stop the replication agent before making certain changes to an active standby pair.

You must stop the replication agent to make these changes to an active standby pair:

  • Include or exclude a cache group after the active standby pair has already been created.

    Note: See Replicating Cache Groups Within Active Standby Pairs for details on how to add a cache group that already exists before you create the active standby pair.

  • Add or drop a subscriber.

  • Change values in the STORE clause.

  • Change network operations (ADD ROUTE or DROP ROUTE clause).

To alter an active standby pair according to the preceding list, complete the following tasks:

  1. Stop the replication agent on the active database. See Starting and Stopping the Replication Agents.

  2. If the active standby pair includes cache groups, stop the cache agent on the active database.

  3. Use the ALTER ACTIVE STANDBY PAIR statement to make changes to the replication scheme. See Examples Showing How to Alter an Active Standby Pair.

  4. Start the replication agent on the active database. See Starting and Stopping the Replication Agents.

  5. If the active standby pair includes cache groups, start the cache agent on the active database.

  6. Destroy the standby database and the subscribers.

  7. Duplicate the active database to the standby database. You can use either the ttRepAdmin -duplicate utility or the ttRepDuplicateEx C function to duplicate a database. If the active standby pair includes cache groups, use the -keepCG command line option with ttRepAdmin to preserve the cache group. See Duplicating a Database.

  8. Set up the replication agent policy on the standby database and start the replication agent. See Starting and Stopping the Replication Agents.

  9. Wait for the standby database to enter the STANDBY state. Use the ttRepStateGet built-in procedure to check the state.

  10. If the active standby pair includes cache groups, start the cache agent for the standby database using the ttCacheStart built-in procedure or the ttAdmin -cacheStart utility.

  11. Duplicate all of the subscribers from the standby database. See Duplicating a Master Database to a Subscriber. If the active standby pair includes cache groups, use the -noKeepCG command line option with ttRepAdmin in order to convert the cache group to regular TimesTen tables on the subscribers. See Duplicating a Database.

  12. Set up the replication agent policy on the subscribers and start the agent on each of the subscriber databases. See Starting and Stopping the Replication Agents.

Examples Showing How to Alter an Active Standby Pair

These examples demonstrate adding, dropping and changing an active standby pair.

The following example demonstrates adding a subscriber to an active standby pair

ALTER ACTIVE STANDBY PAIR
  ADD SUBSCRIBER sub1;

The following example demonstrates dropping subscribers from an active standby pair.

ALTER ACTIVE STANDBY PAIR
  DROP SUBSCRIBER sub1
  DROP SUBSCRIBER sub2;

The following example demonstrates changing the PORT and TIMEOUT settings for subscribers.

Alter the PORT and TIMEOUT settings for subscribers sub1 and sub2.

ALTER ACTIVE STANDBY PAIR
  ALTER STORE sub1 SET PORT 23000 TIMEOUT 180
  ALTER STORE sub2 SET PORT 23000 TIMEOUT 180;

The following example demonstrates adding a cache group to an active standby pair.

ALTER ACTIVE STANDBY PAIR
  INCLUDE CACHE GROUP cg0;