ttRepSubscriberWait

This procedure causes the caller to wait until all transactions that committed before the call have been transmitted to the subscriber subscriberStoreName. It also waits until the subscriber has acknowledged that the updates have been durably committed at the subscriber database.

Call this procedure in a separate transaction, when no other transaction is pending on the active database. This call returns an error if any transactions on the active database are open.

If you set the waitTime parameter to -1 and the subscriberStoreName parameter to NULL, the ttRepSubscriberWait procedure does not return until all updates committed up until the time of the procedure call have been transmitted to all subscribers, and all subscribers have acknowledged that the updates have been durably committed.

The ttRepSubscriberWait procedure should not be used when an urgent response is required. Instead, you should use the return receipt service.

The procedure is working as expected for transient error scenarios.

Note:

If this procedure is called after all write transaction activity is quiesced at a store (there are no active transactions and no transactions have started), it may take 60 seconds or longer before the subscriber sends the acknowledgment that all updates have been durably committed at the subscriber.

The procedure does not return any failure output ( 01 value) for permanent error scenarios.

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

ttRepSubscriberWait('replicationName', 'replicationOwner', 
'subscriberStoreName', 'subscriberHostName', waitTime)

Parameters

ttRepSubscriberWait has these parameters:

Parameter Type Description

replicationName

TT_CHAR (30)

The name of the replication scheme on which to operate. May be NULL to indicate all replication schemes.

replicationOwner

TT_CHAR (30)

The owner of the replication scheme. May be NULL to indicate all replication scheme owners.

subscriberStoreName

TT_VARCHAR (200)

The name of the subscribing database whose state is to be set. May be NULL to indicate all stores on host subscriberHostName.

subscriberHostName

TT_VARCHAR(200)

The subscriber's host. May be NULL to indicate all hosts of subscribing peers.

waitTime

TT_INTEGER NOT NULL

Number of seconds to wait for the specified subscriber(s). A value of -1 indicates to wait forever. This parameter is required and may not be NULL.

Result Set

ttRepSubscriberWait returns the result set:

Column Type Description

timeOut

BINARY(1)

0x00 - The wait succeeded within the allotted waitTime; the specified subscribers are up to date at the time this procedure was called. TimesTen returns 0x01 if not enough time has been granted.

Examples

If there is one defined replication scheme REPOWNER.REPSCHEME, to direct the transmitting database to wait ten minutes for subscriber REP2 on SERVER2 to catch up, use:

CALL ttRepSubscriberWait('REPSCHEME','REPOWNER', 
'REP2', 'SERVER2', 600);