Managing a Cache Environment With Oracle Database Objects

For a cache group with autorefresh, TimesTen creates a change log table and two triggers in the Oracle database for each cache table in the cache group. One trigger is fired for each INSERT statement and another trigger is fired for each UPDATE or DELETE statement on the cached Oracle Database table.

These triggers record the primary key of the changed rows in the change log table.

The cache agent periodically scans the change log table for modified keys and then joins this table with the cached Oracle Database table to get a snapshot of the latest changes.

Note:

If you cache the same Oracle database table in a cache group on two different TimesTen databases, we recommend that you use the same cache administration user name on both TimesTen databases as the owner of the cache table on each TimesTen database. See Caching the Same Oracle Table on Two or More TimesTen Databases.

For each cache administration user, TimesTen creates the following Oracle Database tables, where version is an internal TimesTen version number and object-ID is the ID of the cached Oracle Database table:

Table Name Description

TT_version_AGENT_STATUS

Created when the first cache group is created. Stores information about each Oracle Database table cached in a cache group with autorefresh.

TT_version_AR_PARAMS

Created when the cache administration user name and password is set. Stores the action to take when the cache administration user's tablespace is full.

TT_version_ARDL_CG_COUNTER

Created when you execute either the grantCacheAdminPrivileges.sql or the initCacheAdminSchema.sql scripts or when the cache administration user and password are set. Contains information used for reducing contention for dynamic read-only cache groups with incremental autorefresh. See Reducing Contention for Dynamic Read-Only Cache Groups With Incremental Autorefresh.

TT_version_CACHE_STATS

Created when the cache administration user name and password is set.

TT_version_CACHED_COLUMNS

Stores list of columns that are cached. Created when you run the initCacheAdminSchema.sql script or when you set the cache administration user and password.

TT_version_DATABASES

Created when the cache administration user name and password is set. Stores the autorefresh status for all TimesTen databases that cache data from the Oracle database.

TT_version_DB_PARAMS

Created when the cache administration user name and password is set. Stores the cache agent timeout, recovery method for dead cache groups, and the cache administration user's tablespace usage threshold.

TT_version_DBSPECIFIC_PARAMS

Internal use.

TT_version_DDL_L

Created when the cache administration user name and password is set. Tracks DDL statements issued on cached Oracle Database tables.

TT_version_DDL_TRACKING

Created when the cache administration user name and password is set. Stores a flag indicating whether tracking of DDL statements on cached Oracle Database tables is enabled or disabled.

TT_version_LOG_SPACE_STATS

Created when the cache administration user and password are set. Contains statistics used to monitor the cache administration user table space. See Managing the Cache Administration User's Tablespace.

TT_version_REPACTIVESTANDBY

Created when the first AWT cache group is created. Tracks the state and roles of TimesTen databases containing cache tables in an AWT cache group that are replicated in an active standby pair replication scheme.

TT_version_REPPEERS

Created when the first AWT cache group is created. Tracks the time and commit sequence number of the last update on the cache tables that was asynchronously propagated to the cached Oracle Database tables.

TT_version_SYNC_OBJS

Created when the first cache group is created.

TT_version_USER_COUNT

Created when the first cache group is created. Stores information about each cached Oracle Database table.

TT_version_object-ID_L

One change log table is created per Oracle Database table cached in a cache group with autorefresh when the cache group is created. Tracks updates on the cached Oracle Database table.

For each cache administration user, TimesTen creates the following Oracle Database triggers, where version is an internal TimesTen version number, object-ID is the ID of the cached Oracle Database table, and schema-ID is the ID of user who owns the cached Oracle Database table:

Trigger Name Description

TT_version_REPACTIVESTANDBY_T

Created when the first AWT cache group is created. When fired, inserts rows into the TT_version_REPACTIVESTANDBY table.

TT_version_object-ID_T

This trigger is created for each Oracle Database table cached in a cache group with autorefresh when the cache group is created. Fires for each update or delete operation issued on the cached Oracle Database table to track operations in the TT_version_object-ID_L change log table.

TT_version_object-ID_TI

This trigger is created for all autorefreshed cached tables, except for autorefreshed cached tables that are exclusively cached as root tables in dynamic read-only cache groups. Fires for each insert operation issued on the cached Oracle Database table to track operations in the TT_version_object-ID_L change log table.

TT_version_schema-ID_DDL_T

One trigger for each user who owns cached Oracle Database tables. Created when a cache group is created after tracking of DDL statements has been enabled. Fired for each DDL statement issued on a cached Oracle Database table to track operations in the TT_version_DDL_L table.