ttRepStateGet

This procedure returns the current replication state of a database in an active standby pair.

Required Privilege

This procedure requires no 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

ttRepStateGet()

Parameters

ttRepStateGet has no parameters.

Result Set

ttRepStateGet returns the result:

Column Type Description

state

TT_VARCHAR (20) NOT NULL

The current replication state of the database. One of:

ACTIVE - The database is currently the active master database. Applications may update its replicated tables.

STANDBY - The database is the standby master database. Applications may only update its non-replicated tables.

FAILED - The database is a failed master database. No updates are replicated to it.

IDLE - The database has not yet been assigned its role in the active standby pair. It cannot be updated by applications or replication. Every store comes up in the IDLE state.

RECOVERING - The store is in the process of synchronizing updates with the active store after a failure.

Examples

To determine the replication state of the active standby pair, use:

Call ttRepStateGet();
<STANDBY>
 
Call ttRepStateGet();
<ACTIVE>
 
Call ttRepStateGet();
<FAILED>