ttRepXactStatus

This procedure checks on the status of a RETURN RECEIPT or RETURN TWOSAFE replication transaction. Using the built-in procedure ttRepXactTokenGet, you can get the token of a RETURN RECEIPT or RETURN TWOSAFE transaction. This is then passed as an input parameter to this built-in procedure. Only a token received from ttRepXactTokenGet may be used. The procedure returns a list of rows each of which have three parameters, a subscriber name, the replication status with respect to the subscriber and an error string that is only returned if a RETURN TWOSAFE replication transaction began but did not complete commit processing.

Note:

The error parameter is only returned for RETURN TWOSAFE transactions.

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

ttRepXactStatus(xactID)

Parameters

ttRepXactStatus has the parameter:

Parameter Type Description

xactID

VARBINARY (10000)

If no parameter is specified, status is returned for one of the following:

  • If called in a transaction that has begun, but not completed, commit processing, it returns the status of the transaction.

  • If called at any other time, it returns status for the most recently committed transaction on the connection that was in RETURN RECEIPT or RETURN TWOSAFE mode.

Result Set

ttRepXactStatus returns the result set:

Column Type Description

subscriberName

TT_CHAR (61)

The name of the database that subscribes to tables updated in the transaction. The name returns as: store_name@host_name.

state

TT_CHAR (2)

The state of the transaction with respect to the subscribing database. The return values are one of the following:

'NS' - Transaction not sent to the subscriber.

'RC' - Transaction received by the subscriber agent.

'CT' - Transaction applied at the subscriber store. (Does not convey whether the transaction ran into an error when being applied.)

'AP' - Transaction has been durably applied on the subscriber.

errorString

TT_VARCHAR (2000)

Error string retuned by the subscriber agent describing the error it encountered when applying the twosafe transaction. If no error is encountered, this parameter is NULL. Non-null values are only returned when this procedure is called inside a twosafe replication transaction that has begun, but has not yet completed, processing a commit.