ttReplicationStatus

This procedure returns the status of one or more replication peer databases.

Required Privilege

This procedure requires no privilege.

Related Views

This procedure has no related views.

Syntax

ttReplicationStatus(['subscriber'], ['hostname'])

Parameters

ttReplicationStatus has the optional parameters:

Parameter Type Description

subscriber

TT_VARCHAR (200)

Subscriber of interest or NULL for all subscribers. If the parameter is provided, then it names a replication subscriber about which information is sought. If the parameter is not provided, then information on replication subscribers defined for the current database is returned.

hostname

TT_VARCHAR (200)

The host name of one or more stores that are configured to receive updates from the executing store; if NULL, then receiving stores are identified by subscriber alone. If both receiver and host name are NULL, then all receiving stores are selected.

Result Set

ttReplicationStatus returns the result set:

Column Type Description

subscriber

TT_VARCHAR(200) NOT NULL

Subscriber name.

hostName

TT_VARCHAR(200) NOT NULL

Name of the system that hosts the subscriber.

port

TT_INTEGER NOT NULL

TCP/IP port used by the subscriber agent to receive updates from the master. A value of 0 indicates replication has automatically assigned the port.

pState

TT_CHAR(10) NOT NULL

Current replication state of the subscriber with respect to its master database. The values of the result column are:

start - Replication is enabled to this peer.

pause - Replication is temporarily paused to this peer. TimesTen preserves updates. See Set the Replication State of Subscribers in Oracle TimesTen In-Memory Database Replication Guide for more information.

stop - Replication updates are NOT being collected for this peer.

failed - Replication to a subscriber is considered failed because the threshold limit (log data) has been exceeded. This state is set by the system.

logs

TT_INTEGER NOT NULL

Number of transaction log files the master database is retaining for a subscriber.

lastMsg

TT_INTEGER

Seconds since last interaction or NULL.

replicationName

TT_CHAR(30) NOT NULL

Name of replication scheme.

replicationOwner

TT_CHAR(30) NOT NULL

Owner of replication scheme.

Examples

Command> call ttReplicationStatus();
< MASTER2, HOST1, 0, start     , 1, 257142, \
     _ACTIVESTANDBY         , TTREP       >
1 row found.

Command> call ttReplicationStatus('master2', 'host1');
< MASTER2, HOST1, 0, start     , 1, 266439, \
     _ACTIVESTANDBY                , TTREP                          >
1 row found.

Notes

  • If the receiver parameter is not NULL, only the status of the given receiver is returned. If the receiver parameter is NULL, the status of all subscribers is returned.

  • This procedure is supported only for TimesTen Data Manager ODBC applications. It is not supported for TimesTen Client or JDBC applications.