Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186

    Unanswered: 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

  2. #2
    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
    Last edited by Romeo; 09-13-04 at 08:14.
    There are 10 kinds of people,
    those who know binary and those who don't.

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

  3. #3
    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

  4. #4
    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

  5. #5
    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

Posting Permissions

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