Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Posts
    23

    Unanswered: is "all applications disconnection" anathor tigger of page cleaner?

    if "all applications disconnection" is anathor tigger of page cleaner?

    hi all

    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

    is it right?

    thks for all

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    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,
    Grofaty
    Last edited by grofaty; 08-09-07 at 07:57.

  3. #3
    Join Date
    Aug 2007
    Posts
    23
    thanks a lot ,Grofaty

    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 ?

    THKs

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    1. yes. Activate database command loads logs (from disk) and establish bufferpools (memory) etc. So disconnect all applications doesn't effect logs and bufferpools etc.

    2. yes. I haven't tested this, but it is this logic. Try looking at db2 get db cfg for <database> before deactivate and after it.

    3. don't know exactly. Try looking at db2 get db cfg...

    Hope this helps,
    Grofaty

  5. #5
    Join Date
    Aug 2007
    Posts
    23
    thanks a lot, got it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •