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 > db2 log space when LOGRETAIN is OFF

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-13-04, 07:01
dahalkar_p dahalkar_p is offline
Registered User
 
Join Date: Oct 2001
Location: Bangalore
Posts: 186
db2 log space when LOGRETAIN is OFF

Hi Guys,

I am using db2 7.1 Fixpak 10a on AIX 5.1. My LOGRETAIN AND USEREXIT parameters are set to OFF. Can i find the amount of log being written in a weeks time.

Please let me know if there is any way to calculate this.

Cheers,
__________________
Prashant
Reply With Quote
  #2 (permalink)  
Old 09-13-04, 07:05
Romeo Romeo is offline
Registered User
 
Join Date: Feb 2002
Location: Philippines
Posts: 41
check the values of:

LOGFILSIZ (that is 4KB pages.... just multiple it by 4kb )
LOGPRIMARY (number of primary log files)
LOGSECONDARY

Log files are located at the "Path to log files" in the DB CFG


i forgot to mention... since LOGRETAIN is OFF... then you are in circular logging... which means, logs are overwritten... so once its allocated, it won't grow more than what was defined
__________________
There are 10 kinds of people,
those who know binary and those who don't.

http://www.linkedin.com/in/rtitong

Last edited by Romeo; 09-13-04 at 07:14.
Reply With Quote
  #3 (permalink)  
Old 09-13-04, 07:29
dahalkar_p dahalkar_p is offline
Registered User
 
Join Date: Oct 2001
Location: Bangalore
Posts: 186
Thank you Romeo,

All those calculations are fine. I am interested in knowing if we can calculate the amount of data written in a weeks time. Circular logging will allocate all the primary logs initially and on demand the secondary will also be allocated.

We need to know how much log data is generated in a weeks time. The amount of log space allocated does not tell us that. May be we will need to review how the log rba progresses over a weeks worth of elapsed time. Not sure exactly where we will get that but it certainly should be available.

Regards,
__________________
Prashant
Reply With Quote
  #4 (permalink)  
Old 09-13-04, 08:31
Romeo Romeo is offline
Registered User
 
Join Date: Feb 2002
Location: Philippines
Posts: 41
well, in circular logging, you can't really determine because DB2 would just use the logs again...

it really depends on the number of commits / rollbacks done on the database... it would be better if you turn the LOGRETAIN on and record the current log files used until the active log file after a week... then probably you'll have an estimate

better yet.... get the Administration Guide: Planning (db2d1e80) redbook from IBM
__________________
There are 10 kinds of people,
those who know binary and those who don't.

http://www.linkedin.com/in/rtitong
Reply With Quote
  #5 (permalink)  
Old 09-13-04, 16:47
dbamota dbamota is offline
Registered User
 
Join Date: Sep 2003
Posts: 237
How about this way? more than enough Primary logs so that you do not run out of log space by a long running transaction.NO secondary logs. Every 15 minutes or so a cronjob to append to a file the logfilehead.
db2 get db cfg for crmp|grep "First active">>logoutf
After a week you know how many times the primary pool is cycled; hence how much lg space
__________________
mota
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