Reversing the Roles of the Active and Standby Databases
You can change the role of the active database to standby and vice versa.
- Pause any applications that are generating updates on the current active database.
- Call
ttRepSubscriberWaiton the active database, with the DSN and host of the current standby database as input parameters. It must return success (<00>). This ensures that all updates have been transmitted to the current standby database. - Stop the replication agent on the current active database. See Starting and Stopping the Replication Agents.
- Call
ttRepDeactivateon the current active database. This puts the database in theIDLEstate. - Call
ttRepStateSet('ACTIVE')on the current standby database. This database now acts as the active database in the active standby pair. - Set up the replication agent policy and start the replication agent on the old active database.
- Use the
ttRepStateGetbuilt-in procedure to determine when the database's state has changed fromIDLEtoSTANDBY. The database now acts as the standby database in the active standby pair. - Resume any applications that were paused in Step 1.