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 > Limiting size of transaction logs when incremental backups are enabled - Help please

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-05, 10:30
Razor1973 Razor1973 is offline
Registered User
 
Join Date: Jul 2004
Posts: 53
Question 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?
Reply With Quote
  #2 (permalink)  
Old 12-15-05, 12:06
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I think if you enable userexit DB2 will reuse archived log files.
Reply With Quote
  #3 (permalink)  
Old 12-15-05, 14:45
Razor1973 Razor1973 is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 12-15-05, 14:56
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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
Reply With Quote
  #5 (permalink)  
Old 12-16-05, 04:02
przytula przytula is offline
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old 12-16-05, 04:28
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 12-16-05 at 04:30.
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