If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > is "all applications disconnection" anathor tigger of page cleaner?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-09-07, 04:01
myprotein myprotein is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
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
Reply With Quote
  #2 (permalink)  
Old 08-09-07, 06:54
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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 06:57.
Reply With Quote
  #3 (permalink)  
Old 08-09-07, 07:47
myprotein myprotein is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 08-09-07, 08:46
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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
Reply With Quote
  #5 (permalink)  
Old 08-09-07, 09:07
myprotein myprotein is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
thanks a lot, got it
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On