This content has been marked as final. Show 4 replies
A few things to note...
1. Never change the system time by a large amount while TimesTen is running, especially backwards. The results are 'undefined' but in general many different problems will arise. Yoiu need to stop TimesTen (including the main daemon) if yiou want to set the date back in time. This issue apoplies to lots of softyware not just TimesTen.
2. Changing the time to a point in the past will not trigger aging. You need to set the time to a point > 180 days in the future... Rows that are candidates to be aged are those where (system_date - end_date) > 180 days. If system_date < end_date then this condition cannot be true...
3. The aging comparison is based on the defined units (days in this case). The result of (system_date - end_date) is truncated to days before comparison with the lifetime so rows will only become candidates for aging when the day in system_date rolls over. Checking for aging eveyr 3 secodns is pointless in thsi case. If you want an aging granularity of secodns but a lifetime of 180 days then you should specify the lifetime as 15552000 seconds (180 * 24 * 60 * 60).
Thanks a lot for your great advice!
The Time-based Aging function of TT performs very well if I set the system date (to 01/01/2000) before starting ttdaemonadmin.
And then, if I change system time to any time later than the original one I set, the cache group updated immediately! Wow! It's cool!
BTW, I noticed that when I connected to my DSN, I always get this message when I try to "select * from hr.job_history".
Command> select * from hr.job_history;
3374: Member may contain stale global cache group table data. Please attach to the grid to clean up the data
The command failed.
I called ttrepstop before exit the last connection.
Is there a way for how to avoid this warning? Thanks again!
It sounds like, at some point, you attached your TT database to a grid and created a global cache group but that now the database is not attached to the grid and so grid functionality is not available and hence the global CG tables may have stale data.
If you want to use cache grid, as opposed to non-grid cache, then you should start the cache agent and reattach to the grid. If you don't need cache grid functionality it's best to create a non-global cache group. For more information, study the section on cache grid in the TT Cache User's Guide.