ttCacheAutorefreshXactLimit

This procedure starts an immediate autorefresh on single table cache groups within a specified autorefresh interval and commits after the specified number of operations.

This procedure is useful if updates have occurred on the Oracle database and you want to refresh them on the cache group before the next scheduled autorefresh.

To modify the reclaim buffer size, use the ttDBConfig built-in procedure.

Required Privilege

This procedure requires the CACHE_MANAGER or ADMIN privilege.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in both TimesTen Classic and TimesTen Scaleout.

Related Views

This procedure has no related views.

Syntax

ttCacheAutorefreshXactLimit ('IntervalValue', 'Value')

Parameters

ttCacheAutorefreshXactLimit has the parameters:

Parameter Type Description

param

VARCHAR2 (50) NOT NULL

Indicates the interval at which the autorefresh cache groups are defined to occur in units of milliseconds. IntervalValue is an integer value in milliseconds that was specified when the autorefresh cache group was created on how often autorefresh is scheduled.

value

VARCHAR2 (200)

The Value can be one of the following:

  • 'ON' - Enables autorefresh to commit after every 256 operations.

  • 'OFF' - Disables the transaction limit for autorefresh cache groups and sets autorefresh back to using a single transaction.

  • number - Denotes when to commit after a certain number of operations. For example, if the user specifies 1024, then autorefresh commits after every 1024 operations in the transaction. If you specify a negative number, an error is returned.

  • NULL - When the value is NULL, 0 or not specified, the current setting is returned.

Result Set

ttCacheAutorefreshXactLimit returns the results:

Column Type Description

param

VARCHAR2 (50)

The interval at which the autorefresh cache groups are defined to occur in units of milliseconds.

value

VARCHAR2 (200)

The Value can be one of the following:

  • 'ON' - Enables autorefresh to commit after every 256 operations.

  • 'OFF' - Disables the transaction limit for autorefresh cache groups and sets autorefresh back to using a single transaction.

  • number - Denotes when to commit after a certain number of operations. For example, if the user specifies 1024, then autorefresh commits after every 1024 operations in the transaction. If you specify a negative number, an error is returned.

  • NULL - When the value is NULL or not specified, the current setting is returned.

Examples

The following example sets up the transaction limit to commit after every 256 operations for all incremental autorefresh read-only cache groups that are defined with an interval value of 10 seconds.

call ttCacheAutorefreshXactLimit('10000', 'ON');

After the month end process has completed and the incremental autorefresh read-only cache groups are refreshed, disable the transaction limit for incremental autorefresh read-only cache groups that are defined with the interval value of 10 seconds.

call ttCacheAutorefreshXactLimit('10000', 'OFF');

To enable the transaction limit for incremental autorefresh read-only cache groups to commit after every 2000 operations, provide 2000 as the value as follows:

call ttCacheAutorefreshXactLimit('10000', '2000');

Notes

  • This procedure is available only for cache operations. This built-in procedure only applies for static read-only cache groups with incremental autorefresh.

  • While autorefresh is in-progress and is being applied in several small transactions, transactional consistency cannot be maintained. Once the autorefresh cycle has completed, the data is transactional consistent.

  • The setting for ttCacheAutorefreshXactLimit is not replicated or duplicated. The user must execute the built-in procedure on both the active and standby nodes.

  • The settings do not reset if you drop all cache groups for the interval.

  • The ttMigrate, ttBackup, and ttRestore built-in procedures do not preserve the setting of ttCacheAutorefreshXactLimit.

  • If you alter the cache group autorefresh interval, it does not modify the setting of ttCacheAutorefreshXactLimit.