ttCacheCheck
The ttCacheCheck
built-in procedure performs a check for missing constraints for cached tables on the Oracle database.
Any unique index, unique constraint, or foreign key constraint on columns in Oracle Database tables that are to be cached should also be created on asynchronous writethrough cache tables within TimesTen. If you have not created these constraints on the AWT cache tables and you have configured the cache group for parallel propagation, TimesTen serializes any transactions with DML operations to those tables with missing constraints.
This procedure provides information about missing constraints and the tables marked for serialized propagation.
Call ttCacheCheck
to manually check for missing constraints, under these conditions:
-
After completing a series of
DROP CACHE GROUP
statements. -
After creating or dropping a unique index or foreign key on the Oracle database.
-
To determine why some transactions are being serialized.
This procedure updates system tables to indicate if DML executed against a table should or should not be serialized, therefore you must commit or roll back after the ttCacheCheck
built-in completes.
See Improving AWT Throughput with Parallel Propagation to the Oracle Database in Oracle TimesTen In-Memory Database Cache Guide.
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
ttCacheCheck('operation', cgOwner, cgName)
Parameters
ttCacheCheck
has these parameters:
Parameter | Type | Description |
---|---|---|
|
|
Specifies the constraint to be checked. Supported values are:
|
|
|
Specifies the owner of the cached Oracle database table. If If both |
|
|
Specifies the name of the cached Oracle database table. If If both |
Result Set
ttCacheCheck
returns the result set:
Column | Type | Value |
---|---|---|
|
|
The owner of the cache group. |
|
|
The name of the cache group. |
|
|
The owner of the table. |
|
|
The name of the table. |
|
|
The type of Oracle object: unique index, constraint or foreign key. |
|
|
The owner of the Oracle object. |
|
|
The object name. |
|
|
The type of message:
|
|
|
Message describing the issue. |
|
|
A description of the object. If the object is |
Examples
The following example determines if there are any missing constraints for the cache
group update_orders
that is owned by cacheadmin
. A
result set is returned that includes the warning message. The
ordertab
table in the update_orders
cache
group is marked for serially propagated transactions.
Command> call ttCacheCheck( NULL, 'cacheadmin, 'update_orders'); < CACHEADMIN, UPDATE_ORDERS, CACHEADMIN, ORDERTAB, Foreign Key, CACHEADMIN, CUST_FK, 1, Transactions updating this table will be serialized to Oracle because: The missing foreign key connects two AWT cache groups., table CACHEADMIN.ORDERTAB constraint CACHEADMIN.CUST_FK foreign key(CUSTID) references CACHEADMIN.ACTIVE_CUSTOMER(CUSTID) > 1 row found.
This procedure is available only for cache operations.