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
STOREclause. -
Change network operations (
ADD ROUTEorDROP ROUTEclause).
To alter an active standby pair according to the preceding list, complete the following tasks:
-
Stop the replication agent on the active database. See Starting and Stopping the Replication Agents.
-
If the active standby pair includes cache groups, stop the cache agent on the active database.
-
Use the
ALTER ACTIVE STANDBY PAIRstatement to make changes to the replication scheme. See Examples Showing How to Alter an Active Standby Pair. -
Start the replication agent on the active database. See Starting and Stopping the Replication Agents.
-
If the active standby pair includes cache groups, start the cache agent on the active database.
-
Destroy the standby database and the subscribers.
-
Duplicate the active database to the standby database. You can use either the
ttRepAdmin-duplicateutility or thettRepDuplicateExC function to duplicate a database. If the active standby pair includes cache groups, use the-keepCGcommand line option withttRepAdminto preserve the cache group. See Duplicating a Database. -
Set up the replication agent policy on the standby database and start the replication agent. See Starting and Stopping the Replication Agents.
-
Wait for the standby database to enter the
STANDBYstate. Use thettRepStateGetbuilt-in procedure to check the state. -
If the active standby pair includes cache groups, start the cache agent for the standby database using the
ttCacheStartbuilt-in procedure or thettAdmin-cacheStartutility. -
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
-noKeepCGcommand line option withttRepAdminin order to convert the cache group to regular TimesTen tables on the subscribers. See Duplicating a Database. -
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;