Unanswered: is "all applications disconnection" anathor tigger of page cleaner?
if "all applications disconnection" is anathor tigger of page cleaner?
I discovered that when all application disconnect from the database, db2 will "truncate" current active log file and push forward a new log file either by reusing a exist log or by generating a new log file.
when anather application get connected to current database, execute "db2 get db cfg for xxxxx", u should see that the first active log is just the file that db2 has pushed forwarded. it indicat that: db2 has already call page cleaner to flush the transactions included in the original truncated log file.
so i conclude that: "all applications disconnection" is anathor tigger of page cleaner
disconnecting applications makes some changes (including page cleaning) if "activate database" command was not executed. For production databases it is recommended you execute "activate database" command to have database ready all the time. Activation turns off when db2stop is executed (of course the same if computer is rebooted) or executing command "deactivate database".
P.S. Don't forget that off line backup can't be executed if activate command is on.
Hope this helps,
you main that，
1、if i execute "activate db" firstly, even all applications disconnect, log won't be changed.
2、and more, if i execute "deactive", then the log will be truncated,is it right?
3、one more question, what will db2 do when "truncating" the log file? Does it main that even the current log is not full , db2 will stop writing it , and gernerate a new log file,then flush all the transaction that happened before and in the current log? will db2 flush it ?