ttCacheConfig

For all cache groups that cache data from the same Oracle instance, this procedure specifies a timeout value and recovery policies in the case that the Oracle database server is unreachable and the cache agent or database is considered terminated.

The automatic refresh state of the database and cache groups can be determined from the procedure ttCacheDbCgStatus.

Required Privilege

This procedure requires the CACHE_MANAGER 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

ttCacheConfig(Param, tblOwner, tblName, Value)

Parameters

ttCacheConfig has these parameters:

Parameter Type Description

Param

VARCHAR2(50)
NOT NULL

Specifies the parameter to be set by Value:

  • AgentFailoverTimeout - When working in an Oracle RAC environment, sets the TAF timeout, in minutes. Configures how long TAF retries when establishing a connection. The default is four minutes.

  • AgentTimeout - Number of seconds before a database is declared terminated if the cache agent cannot connect to the Oracle database server.

  • AutoRefreshLogFragmentationWarningPCT - The percent of table usage that must occur before warning the user to compact the table. By default, value is 40.

  • AutorefreshLogMonitorInterval - Specifies the time interval (in seconds) for how often to perform the percentage calculation of the cache administration user's tablespace usage. Default value is 300 seconds.

  • AutoRefreshLogDeFragmentAction - Compaction mode for the specified tables.

  • AutoRefreshLogTblSpaceUsagePCT - Specifies the cache administration user's tablespace usage warning threshold as a percentage.

  • CacheCommitDurable - Specifies how the autorefresh changes to the metadata is durably committed.
  • DeadDbRecovery - Specifies the type of autorefresh recovery when the cache agent restarts.

  • DisableFullAutorefresh - Disables or enables full autorefresh behavior. Default is 0, meaning that full autorefresh is enabled. The value of 1 indicates that full autorefresh is disabled.

  • TblSpaceFullRecovery - Specifies the action that TimesTen takes when the cached Oracle database table is updated and the cache administration user's tablespace is full.

tblOwner

VARCHAR2(30)

Specifies the owner of the cached Oracle database table.

This parameter is required if Param is set TblspaceFullRecovery. Do not specify tblOwner for other values of Param.

A synonym cannot be used to specify a table name.

tblName

VARCHAR2(30)

Specifies the name of the cached Oracle database table.

This parameter is required if Param is set TblspaceFullRecovery. Do not specify tblOwner for other values of Param.

Using a synonym to specify a table name is not supported.

Value

VARCHAR2(200)

Specifies the value to be set for Param.

  • When Param is AgentFailoverTimeout, it specifies the number of minutes before TAF retries when establishing a connection, when working in an Oracle RAC environment. The default is four minutes.

  • When Param is AgentTimeout, it specifies the number of seconds before a database is declared terminated if the cache agent cannot connect to the Oracle database server. The default is 0, which means that the database is never declared terminated.

  • When Param is AutoRefreshLogTblSpaceUsagePCT, the value can be 0 to 100. The default is 0, which means no warning is returned regardless of the tablespace usage.

  • When Param is AutoRefreshLogFragmentationWarningPCT, the value of the fourth parameter must be an integer between 1 and 100, representing a percentage of the table. The default is 40.

  • When Param is AutorefreshLogMonitorInterval, it specifies the interval in seconds when to calculate the percentage of usage of the cache administration user's tablespace. The default is every 300 seconds.

  • When Param is AutoRefreshLogDeFragmentAction, the value can be Manual, CompactOnly or CompactandReclaim If Manual is specified no action is taken. The user can run ttCacheAutorefreshLogDefrag built-in procedure to defragment the logs. If CompactOnly is specified trigger log space is compacted. If CompactandReclaim is specified both the trigger log space and the transaction log buffer (reclaim space) are compacted. The default is Manual.

  • When Param is CommitCacheDurable, the value can be 0 or 1.

    When value is set to 1 (the default), then an autorefresh operation applies all changes to the cache group tables, durably commits the metadata (and all pending transaction data in the transaction log buffer), and then initiates garbage collection for the autorefresh tracking tables stored on the Oracle database.

    When value is set to 0, then an autorefresh operation applies all changes to the cache group tables and non-durably commits the metadata. Then, starts a new thread to durably commit the metadata (and all pending transaction data in the transaction log buffer). Garbage collection is initiated for the autorefresh tracking tables stored on the Oracle database after the durable commit of the metadata completes. This results in a slight performance cost as garbage collection is delayed until after the durable commit completes.

  • When Param is DeadDbRecovery, the value can be Normal, Manual or None. Normal specifies a full automatic refresh. Manual specifies that REFRESH CACHE GROUP statement must be issued. None specifies that cache groups must be dropped and then re-created after the cache agent starts. The default is Normal. See Impact of Failed Autorefresh Operations on TimesTen Databases in the Oracle TimesTen In-Memory Database Cache Guide for details.

  • When Param is TblSpaceFullRecovery, the value can be Reload or None. Reload specifies that rows are deleted from the change log table and a full automatic refresh is performed. None specifies that an Oracle database error is returned when the cached Oracle database table is updated. The default is None.

Or Specifies the value to be set by AwtErrorXmlOutput:

  • ASCII - A text file that contains the AWT error report. (Default)

  • XML - An XML file that contains the AWT error report and the associated DTD file.

Result Set

ttCacheConfig returns no results when an application uses it to set parameter values. When it is used to return parameter settings, ttCacheConfig returns the following results.

Column Type Value

Param

VARCHAR2(50)

Parameter name:

AgentTimeout

AgentFailoverTimeout

AutoRefreshLogTblSpaceUsagePCT

AutoRefreshLogFragmentationWarningPCT

AutorefreshLogMonitorInterval

AutoRefreshLogDeFragmentAction

DeadDbRecovery

DisableFullAutorefresh

TblSpaceFullRecovery

tblOwner

VARCHAR2(30)

Owner of the cached Oracle database table.

tblName

VARCHAR2(30)

Name of the cached Oracle database table.

Using a synonym to specify a table name is not supported.

Value

VARCHAR2(200)

Specifies the value set for Param.

  • When Param is AgentTimeout, it specifies the number of seconds before a database is declared terminated if the cache agent cannot connect to the Oracle database server.

  • When Param is AutoRefreshLogTblSpaceUsagePCT, the value can be 0 to 100.

  • When Param is AutoRefreshLogFragmentationWarningPCT, the value can be 0 to 100.

  • When Param is AutorefreshLogMonitorInterval, the value can be an integer.

  • When Param is AutoRefreshLogDeFragmentAction, the value can be Manual, CompactOnly or CompactandReclaim.

  • When Param is DeadDbRecovery, the value can be Normal or Manual.

  • When Param is TblSpaceFullRecovery, the value can be Reload or None.

Examples

To set the cache agent timeout to 600 seconds (10 minutes), enter:

CALL ttCacheConfig('AgentTimeout',,,'600');

To determine the current cache agent timeout setting, enter:

CALL ttCacheConfig('AgentTimeout');
< AgentTimeout, <NULL>, <NULL>, 600 >
1 row found.

To set the recovery method to Manual for cache groups whose automatic refresh status is dead, enter:

CALL ttCacheconfig('DeadDbRecovery',,,'Manual');

Configure TimesTen to prevent an automatic full refresh and receive an Oracle database error when there is an update on a cached Oracle database table while the cache administration user's tablespace is full. The Oracle database table is terry.customer. See Impact of Failed Autorefresh Operations on TimesTen Databases in the Oracle TimesTen In-Memory Database Cache Guide for details.

CALL ttCacheConfig('TblSpaceFullRecovery','terry','customer','None');

To determine the current setting for TblSpaceFullRecovery on the terry.customer cached Oracle database table, enter:

Command> CALL ttCacheConfig('TblSpaceFullRecovery','terry','customer');
< TblSpaceFullRecovery, TERRY, CUSTOMER, none >
1 row found.

To configure a warning to be returned when the cache administration user's tablespace is 85 percent full and an update operation occurs on the cached Oracle database table, enter:

Command> CALL ttCacheConfig('AutoRefreshLogTblSpaceUsagePCT',,,'85');

TimesTen Classic calculates the percentage of fragmentation for the change log tables as a ratio of used space to the total size of the space. If this ratio falls below a defined threshold, TimesTen alerts you of the necessity for defragmentation of the change log tables by logging a message. By default, this threshold is set to 40%. For example, to set the fragmentation threshold to 50%, perform:

Command> CALL ttCacheConfig('AutoRefreshLogFragmentationWarningPCT',,,'50');
< AutoRefreshLogFragmentationWarningPCT, <NULL>, <NULL>, 50 >
1 row found.

To set the time interval to 3600 seconds for when to calculate the fragmentation percentage of the change log tables, perform:

Command> CALL ttCacheConfig('AutorefreshLogMonitorInterval',,,'3600');
< AutorefreshLogMonitorInterval, <NULL>, <NULL>, 3600 >
1 row found.

When working in an Oracle RAC environment, the following shows how to retrieve the value of the failover timeout:

Command> CALL ttCacheConfig('AgentFailoverTimeout'); 
< AgentFailoverTimeout, <NULL>, <NULL>, 4 > 
1 row found.

The following sets the failover timeout to 5 minutes:

Command> CALL ttCacheConfig('AgentFailoverTimeout',,,5); 
< AgentFailoverTimeout, <NULL>, <NULL>, 5 > 
1 row found.

Notes

  • This procedure is available only for cache operations.

  • You must call the ttCacheConfig built-in procedure from every node in an active standby pair.