If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Transaction logs not efficiently used.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-20-07, 10:14
PKPChuck PKPChuck is offline
Registered User
 
Join Date: Sep 2006
Location: Columbus, OH
Posts: 64
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
Reply With Quote
  #2 (permalink)  
Old 11-20-07, 11:16
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #3 (permalink)  
Old 11-20-07, 12:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #4 (permalink)  
Old 11-26-07, 09:12
PKPChuck PKPChuck is offline
Registered User
 
Join Date: Sep 2006
Location: Columbus, OH
Posts: 64
Thanks guys, this is exactly what I was looking for.

Charlie.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On