Results 1 to 10 of 10

Thread: Log files

  1. #1
    Join Date
    Oct 2004
    Posts
    268

    Unanswered: Log files

    I need to clean up the log files created by DB2 and OS on Linux and AIX servers. Can someone tell me which log files and their location should be cleaned up after reviewing/archiving ?. I know Smith log file is one of them on AIX..........It would be the best if I can have a script to clean them periodically...........

    Thanks for any help.

  2. #2
    Join Date
    Dec 2005
    Posts
    18
    which the db2 version are you on ?

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Which version of DB2 are you on ?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by mdx34
    I need to clean up the log files created by DB2 and OS on Linux and AIX servers. Can someone tell me which log files and their location should be cleaned up after reviewing/archiving ?. I know Smith log file is one of them on AIX..........It would be the best if I can have a script to clean them periodically...........

    Thanks for any help.
    list history backup all for DBNAME

    This will tell you which logs are required for which backup images.

    ie:
    Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
    -- --- ------------------ ---- --- ------------ ------------ --------------
    B D 20051214010002001 N D S0037889.LOG S0037889.LOG

    For my backup above, I need S0037889.LOG and later to get to the current point in time. If I have 100% confidence in that particular backup then I can remove any logs before S0037889.LOG. Usually we keep a few weeks worth just to be sure, you never know when someone needs some data from an old point in time...
    --
    Jonathan Petruk
    DB2 Database Consultant

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I think he means logs like db2diag.log and such.

    They are in $HOME/sqllib/db2dump, where "$HOME" is the instance owner home directory.

  6. #6
    Join Date
    Oct 2004
    Posts
    268
    I am sorry....I have been away for a while.

    The log files that grow over time. What ever they are.........Either the DB2 process creates or the operating system creates.........I am not worried about the software installation log files.

    Thanks.

  7. #7
    Join Date
    Oct 2004
    Posts
    268
    DB2 version 8.1 & 8.2.............

  8. #8
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by mdx34
    The log files that grow over time. What ever they are.........Either the DB2 process creates or the operating system creates.........I am not worried about the software installation log files.
    It's a bit more complicated than that... my post above addresses transaction logs, every INSERT/UPDATE/DELETE to db2 is logged for integrity. If you crash, you can restore and replay the transactions in the logs so you don't lose data.

    Diagnostic logs are where n_i said.
    --
    Jonathan Petruk
    DB2 Database Consultant

  9. #9
    Join Date
    Oct 2004
    Posts
    268
    I am sorry..........No I wasn't talking about transaction logs...........

    Thanks.

  10. #10
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    get the timestamp of the backup as a reply above, and you can use 'prune' command to remove the archived logs
    IBM Certified DBA for DB2 UDB
    IBM Certified Database Developer for DB2 UDB
    DB2 Tech Support, IBM Toronto Software Lab

Posting Permissions

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