Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2004
    Posts
    268

    Unanswered: Log files not removed

    DB2 V9.5 FP8 - RHEL 5.8

    We have a development Linux server with 2 databases on it. The databases are in circular log mode. LOGPRIMARY set to 10 and LOGSECOND set to 100 and LOGFILSIZ set to 2000.
    We have ran out of space on the server because the log files are not automatically deleted. We had log files from September 2012 still sitting on the server. I would think that since the database is in circular log mode the log files would be deleted automatically.

    Is there a db setting/configuration I need to set ?. Any ideas why the files were not deleted ?

    At this point I am thinking to setup a cron job to delete the log files that are older than 10 days.

    Thanks for any help.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    never delete logfiles based on date
    check the db cfg
    First active log file = S0075891.LOG
    maybe some long running transactions..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Oct 2004
    Posts
    268
    Long running transactions from September !. The server was rebooted since then, DB2 was stopped and started since then. That can't be it.

    First active log file = S0002639.LOG ----> January 20
    Last edited by mdx34; 01-24-13 at 10:01.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Are you sure you are using circular log mode now ?
    Are you sure you were using circular log back in Sep ?

    I guess something has changed between September and now.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Oct 2004
    Posts
    268
    Databases were always in circluar mode from day1 and never changed and they still are. These are 2 databases that are ~400MB each.
    Last edited by mdx34; 01-24-13 at 10:10.

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If I remember right, the circular logging primary logs always start at 0 (ie S0000000.LOG ) and go till (logprimary-1).
    Does your log number keep growing ?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I just checked a db in circular logging mode, logprimary 30 , that has been active since beginning of december.. the logs are S0000000.LOG to S0000029.LOG
    The change date on all files is today's date

    -
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  8. #8
    Join Date
    Oct 2004
    Posts
    268
    Thank you for all your help. I ended up doing the db2look/db2move and load the data into new databases. See what happens.

    Thanks again.

Posting Permissions

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