Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Posts
    88

    Unanswered: current log file in db2

    Why is the output of db2pd and database config file giving different output for current log number? Please find below the lines written in green for comparision.

    $ db2pd -database websph -logs

    Database Partition 0 -- Database websph -- Active -- Up 2 days 04:50:42

    Logs:
    Current Log Number 44520
    Pages Written 2791
    Method 1 Archive Status Success
    Method 1 Next Log to Archive 44520
    Method 1 First Failure n/a
    Method 2 Archive Status n/a
    Method 2 Next Log to Archive n/a
    Method 2 First Failure n/a

    Address StartLSN State Size Pages Filename
    0x078000006267ABB8 0x0087BF860000 0x00000000 4000 1476 S0044519.LOG
    0x078000002001FE78 0x0087C0800000 0x00000000 4000 4000 S0044520.LOG
    0x078000002001FF38 0x0087C17A0000 0x00000000 4000 4000 S0044521.LOG


    $ db2 get db cfg for websph|grep " First active log file"
    First active log file = S0044519.LOG

  2. #2
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    db2cap. The Current Log is the 'LAST' log file (most recent). The First Active Log is 'FIRST' log (oldest) log file.

    S0000001.LOG
    S0000002.LOG<--- First Active log
    S0000003.LOG<--- Current Log

  3. #3
    Join Date
    May 2010
    Posts
    88
    Then why did it move to other log when there were still pages left to be filled in the first log?

    Address StartLSN State Size Pages Filename
    0x078000006267ABB8 0x0087BF860000 0x00000000 4000 1476 S0044519.LOG
    0x078000002001FE78 0x0087C0800000 0x00000000 4000 4000 S0044520.LOG

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Did you do a backup ? Did you issue a TRUNCATE LOG command ?

    These are two instances I can think of that will close the logs before it is full .
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Oct 2007
    Posts
    246
    adding with sathyaram, even with db2stop and archive log command (truncated log is same i believe) will also switch logs before it fills up.
    regds
    Paul

Posting Permissions

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