This procedure sets static attributes associated with the caller's use of the replication-based return service. This procedure operates with either the RETURN RECEIPT or RETURN TWOSAFE service.

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.


ttRepSyncSet([requestReturn], [returnWait], [localAction])


ttRepSyncSet has these optional parameters:

Parameter Type Description



0x00 - Turn off the return service for the current transaction.

0x01 - Turn on return services for the current transaction. Committing the transaction resets this attribute to its default value of 0 ("off").

You can use this parameter to turn on or turn off return services only when the replication subscribers have been configured with RETURN RECEIPT BY REQUEST or RETURN TWOSAFE BY REQUEST.



Specifies the number of seconds to wait for return service acknowledgment. The default value is 10. A value of 0 means there is no wait time.

This timeout value overrides the value set by the RETURN WAIT TIME attribute in the CREATE REPLICATION or ALTER REPLICATION statement.

The timeout set by this parameter persists across transaction boundaries and applies to all return services independent of the BY REQUEST option.



Action to be performed in the event the subscriber cannot acknowledge commit of the transaction within the timeout period specified by returnWait. This parameter can only be used for return twosafe transactions. Set to NULL when using the RETURN service.

1 (default) - NO ACTION. When a COMMIT times out, it returns the application unblocked, leaving the transaction in the same state it was when the COMMIT began,. The application may only reissue the COMMIT.

2 - COMMIT. When the COMMIT times out, the transaction is committed locally. No more operations are possible on this transaction, and the replicated databases diverge. This attribute persists across transactions and for the life of the connection.

Result Set

ttRepSyncSet has no result set.


To enable the return receipt service in the current transaction for all the replication elements configured with RETURN RECEIPT BY REQUEST or RETURN TWOSAFE BY REQUEST, use:

rc = SQLExecDirect ( hstmt,
 (SQLCHAR *)"{CALL ttRepSyncSet( 0x01 )}",
                     SQL_NTS )


The call to enable the return receipt service must be part of the transaction (AutoCommit must be off).