Manually Scheduling an Aging Process in TimesTen Classic
Use the ttAgingScheduleNow
built-in procedure to manually start a
one-time aging process on a specified table or on all tables that have an aging policy
defined.
The aging process starts as soon as you call the built-in procedure unless
there is already an aging process in progress. Otherwise the manually started aging
process begins when the aging process that is in progress has completed. After the
manually started aging process has completed, the start of the table's next aging cycle
is set to the time when ttAgingScheduleNow
was called if the table's
aging state is ON
.
The following example shows how the ttAgingScheduleNow
built-in procedure starts a one-time aging process on the sales.orders
table based on the time ttAgingScheduleNow
is called:
Command> CALL ttAgingScheduleNow('sales.orders');
Rows in the sales.orders
root table that are candidates for aging are deleted as well as related rows in the sales.order_item
child table.
When you call the ttAgingScheduleNow
built-in procedure, the aging process starts regardless of whether the table's aging state is ON
or OFF
. If you want to start an aging process on a particular cache group, specify the name of the cache group's root table when you call the built-in procedure. If the ttAgingScheduleNow
built-in procedure is called with no parameters, it starts an aging process and then resets the start of the next aging cycle on all tables in the TimesTen database that have an aging policy defined.
Calling the ttAgingScheduleNow
built-in procedure does not change the aging state of any table. If a table's aging state is OFF
when you call the built-in procedure, the aging process starts, but it is not scheduled to run again after the process has completed. To continue aging a table whose aging state is OFF
, you must call ttAgingScheduleNow
again or change the table's aging state to ON
.
To manually control aging on a cache group, disable aging on the root table by using an ALTER TABLE
statement with the SET AGING OFF
clause. Then call ttAgingScheduleNow
to start an aging process on the cache group.