DB is in Archive Mode. We are creating full Online Backups every night at 23:00. We set automatic removal of old online backups and archive logs.


In backup folder we have two online backups and that is ok:

Backup1 22.02 23:00
Backup2 23.02 23:00

In the archive logs folder we have these logs:

from S0000047.LOG to S0000057.LOG (from 22.02 23:00 to the 23.02 22:41)
from S0000058.LOG to S0000062.LOG (from 23.02 23:00 to this morning 24.02)

Those are OK logs of course. But I noticed that we have also archive logs which should not be there (logs after the backup of 21.02 which is already deleted and all those transactions are already contained within the backup of 22.02). But we have archive logs

from S0000037.LOG to S0000046.LOG (from 22.02 01:41 to the 22.02 22:42)

So those are unnecessary logs. On some other system (server) for some other customer we have also enabled this purging but there we have regular situation - only backups and archive logs after those backups are kept, there are no previous archive logs, but on this system it seems like deletion of all archive logs is late to 1 day.

Why is that I really think this is not regular situation (as I said also based on experience on some other server)

1 Answer 1


You can always clean them up manually or use a script to clean them up (maybe looking for files older than seven days or something).

  • Hi Chris, thank you for answer but I am surprised why are they kept when they should be deleted also? On some other system this works completely correct. Is this some bug or what is the cause? Just to mention that logs from S0000037.LOG to S0000046.LOG will be deleted this evening but then logs from S0000047.LOG to S0000057.LOG will not be deleted although they should be because related backup file will also be deleted. I hope you can understand me - deletion of old archive logs are always 1 day delayed
    – Dejan
    Feb 24, 2015 at 13:40
  • 1
    I have encountered issues where the files are not always cleaned up. My experience and what little looking into it I've done lead me to think it is some form of permissions issue. Sometimes taking an offline backup and then cleaning out the entire archive structure has helped. Sometimes it hasn't. Feb 24, 2015 at 16:06
  • This is really strange that DB2 has this bug
    – Dejan
    Feb 25, 2015 at 8:33
  • Hi Chris, can you maybe help me with this question, link is below, it is very unclear for me and answers are not understandable: dba.stackexchange.com/questions/94455/… thank you in advance
    – Dejan
    Mar 5, 2015 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.