ttRepStateSet

This procedure sets the replication state of a database in an active standby pair replication scheme. Currently, ttRepStateSet may only be used to set the state of a database to ACTIVE, indicating that it is to take the active role in an active standby pair. ttRepStateSet may only be run in the following situations:
  • A database has had a CREATE ACTIVE STANDBY PAIR command run and no failures have occurred since.

  • A database is currently in the STANDBY state, and the other database in the active standby pair has had its state changed from ACTIVE to IDLE using the ttRepDeactivate procedure.

  • A database has just recovered from the local transaction log and was in the ACTIVE state before it went down.

Required Privilege

This procedure requires the ADMIN privilege.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic but not supported in TimesTen Scaleout.

Related Views

This procedure has no related views.

Syntax

ttRepStateSet('state')

Parameters

ttRepStateSet has the parameter:

Parameter Type Description

state

TT_VARCHAR (20) NOT NULL

The replication state of the database. Must be ACTIVE, in this release. Setting a store to ACTIVE designates it as the active database in an active standby pair.

Result Set

ttRepStateSet returns no results.

Examples

To set the replication state of the database to ACTIVE, use:

CALL ttRepStateSet('ACTIVE');