Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Location
    Columbus, OH
    Posts
    69

    Unanswered: Transaction logs not efficiently used.

    DB2 7.2
    AIX 5.2

    I am trying to fully understand why the full transaction log is not being used. We have a script connecting to the db and importing data every 5 minutes. It appears there is a new logfile created each time. I think this makes it difficult to restore and manage all these small logs. Im trying to figure out why the logs get closed prematurely. Trying to figure out if there is a db parameter I can tune or if I have to write my script to keep a persistent connection.

    db2 get db cfg for <db>
    Log file size (4KB) (LOGFILSIZ) = 16384

    ls -l
    172032 Nov 20 09:00 S0001331.LOG
    299008 Nov 20 09:05 S0001332.LOG
    221184 Nov 20 09:10 S0001333.LOG
    360448 Nov 20 09:15 S0001334.LOG
    921600 Nov 20 09:20 S0001335.LOG
    606208 Nov 20 09:25 S0001336.LOG
    262144 Nov 20 09:30 S0001337.LOG
    446464 Nov 20 09:35 S0001338.LOG
    581632 Nov 20 09:40 S0001339.LOG
    266240 Nov 20 09:45 S0001340.LOG
    528384 Nov 20 09:50 S0001341.LOG
    286720 Nov 20 09:55 S0001342.LOG
    323584 Nov 20 10:00 S0001343.LOG

    Thanks
    Charlie

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    My guess is that all the connections to the DB get disconnected between iterations. If this is so, you can ACTIVATE DATABASE to keep it alive all the time.

    HTH

    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Andy is correct. When the first connection to a database is made, the database memory is allocated and new logs are created. Both of these take some time. If you don't have a connection pool on your application server which keeps at least one connection alive, then issue the activate db command.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Sep 2006
    Location
    Columbus, OH
    Posts
    69
    Thanks guys, this is exactly what I was looking for.

    Charlie.

Posting Permissions

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