ttCachePropagateFlagSet
Required Privilege
This procedure requires the CACHE_MANAGER
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.
Syntax
ttCachePropagateFlagSet(CommitsOn)
Parameters
ttCachePropagateFlagSet
has the parameter:
Parameter | Type | Description |
---|---|---|
|
|
If If |
Result Set
ttCachePropagateFlagSet
returns no results.
Notes
-
This procedure is available only for cache operations.
-
If the value of
ttCachePropagateFlagSet
is reenabled several times during a single transaction, the transaction is only partially propagated to the Oracle database. -
ttCachePropagateFlagSet
is the only built-in procedure that applications can use in the same transaction as any of the other cache group operation, such asFLUSH
,LOAD
,REFRESH
andUNLOAD
. -
The propagate flag is reset after a commit or rollback.
-
When using this procedure, it is important to turn off AutoCommit, otherwise after the procedure is called the transaction ends and propagation to the Oracle database is turned back on.
Examples
This example sets autocommit
off to prevent the propagation flag from toggling from off to on after a commit. Calls the ttCachePropagateFlagSet
to turn off propagation. A row is inserted into the TimesTen detail table for oratt.writetab
. Then, propagation is reenabled by calling the ttCachePropagateFlagSet
built-in procedure and setting the flag to one.
Command> set autocommit off; call ttCachePropagateFlagSet(0); INSERT INTO oratt.writetab VALUES (103, 'Agent'); 1 row inserted. Command> COMMIT; Command> SELECT * FROM oratt.writetab; < 100, Oracle > < 101, TimesTen > < 102, Cache > < 103, Agent > 4 rows found. Command> call ttCachePropagateFlagSet(1);
When you select all rows on the Oracle database, the row inserted when propagation was turned off is not present in the oratt.writetab
table on Oracle.
Command> set passthrough 3; SELECT * FROM oratt.writetab; < 100, Oracle > < 101, TimesTen > < 102, Cache > 3 rows found.