Results 1 to 3 of 3

Thread: DB2 space issue

  1. #1
    Join Date
    Feb 2009

    Unanswered: DB2 space issue


    I have a DB2 space issue and I don't know how to manage.
    In an AIX partition of 10 GB I have 6 DB2 instances - for test purposes behind some WebSphere Process Server apps.
    I am not allowed to extend the AIX partition and I have no more space - 100% used space.
    It seems this is caused by archive logs.
    Database server = DB2/AIX64 8.2.9
    is set for all instances.
    After some tests three of them increased dramatically and I ran out of space - for each about 1.6-1.7 GB are used for the archive logs.
    For 'the biggest' instance:
    Number of primary log files (LOGPRIMARY) = 15
    Number of secondary log files (LOGSECOND) = 113
    and in the corresponding path there are exactly 113 S*.LOG files.
    For a 2nd big one I have default settings:
    Number of primary log files (LOGPRIMARY) = 3
    Number of secondary log files (LOGSECOND) = 2
    but in the corresponding path there are exactly 105 S*.LOG files. Is something wrong - can I delete them excepting the last two?
    This means USEREXIT does not manage properly the archive logs - can I delete / move in other partition / compress ...

    Last edited by heartwork93; 02-09-09 at 10:07.

  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Determine the first active log for each database:

    $ db2 get snapshot for database on <yourdb> | grep "first active"
    File number of first active log            = 28877
    You can delete logs prior to that log but that will essentially make prior backups useless.

    Alternatively, you can find what was the earliest log for the last backup and delete files prior to that:
    $ db2 list history backup since 20090208 for <yourdb>
                        List History File for ???????
    Number of matching file entries = 1
     Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID
     -- --- ------------------ ---- --- ------------ ------------ --------------
      B  D  20090208220002001   N    D  S0028871.LOG S0028872.LOG
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Jan 2009
    Zoetermeer, Holland
    Do not delete your logfiles with an O.S.command, always use "db2 prune" .

Posting Permissions

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