Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    53

    Question Unanswered: Limiting size of transaction logs when incremental backups are enabled - Help please

    We have recently implemented an incremental backup-restore procedure for our ever growing database. The person who was in charge of this process informed us that, in order to enable this type of process, transaccion logging needed to be changed. That, instead of circular log files, archived logging needed to be enabled.

    Upon doing this, we saw a change in our database log directory where our log files (1 GB total) are normally stored (...\DB2\NODE0000\SQL00001\SQLOGDIR). Subdirectories were created within that directory following with this structure: ...\SQLOGDIR\DB2\<db name>\NODE0000\<subdirectory name>, where <subdirectory name> varies and these subdirectories get created and erased by DB2, from what we can see (for example, we now have only one, named C0000004). Apparently, DB2 moves log files in there and never erases them. What we find strange is that there are logs in there with today's date, whereas there are logs with yesterday's date in the main log directory (...\SQLOGDIR).

    We recently discovered this directory had grown to more than 120 GB, so we manually went it an erased the older logs.

    Our question is as follows:

    Even if this is necessarily true and this type of logging has to take place in order to be able to run incremental backups, is there a way for DB2 to erase the older log files without us having to create an external application that stays resident?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I think if you enable userexit DB2 will reuse archived log files.

  3. #3
    Join Date
    Jul 2004
    Posts
    53
    Never used that parameter, so I did a search on USEREXIT and a lot of threads came up, but none seem to explain what the effect is on what I am doing. In fact, I saw some threads suggesting you didn't use the program after 8.2.

    Help please.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by Razor1973
    I did a search on USEREXIT and a lot of threads came up
    May be it's time to read the manual instead?

    http://publib.boulder.ibm.com/infoce...n/c0006086.htm

  5. #5
    Join Date
    Nov 2004
    Posts
    374

    archive

    I saw some threads suggesting you didn't use the program after 8.2.
    this is a misunderstanding.. in 8.2 you can specify
    logarchmeth1 = copy/destination path so db2 will handle the archive copy and not the userexit (or vendor/library..)
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    As Guy has suggested, in 8.2 you can set the log archive path in the db cfg as follows:

    db2 update db cfg using logarchmeth1 disk:/path-name

    You can also set a mirror path for archive logs using logarchmeth2.

    This will move archive logs from the active log directory to the path-name specified above. Obviously, you will have to clean the archive log path to keep it from getting full.
    Last edited by Marcus_A; 12-16-05 at 05:30.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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