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 > pruge logs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-06-10, 08:59
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
pruge logs

Hi,
Userexit is enabled in our environment. I read in the document that logs in the active directory needs to be manually purged once they get moved in the other directory. But why are they automatically getting purged in our environment?
Also help me know, why are the logs that got archived are not of the same size? What I understand is, log files moves when they get full; in that case, I should see all the logs files in the archived folder to be of same size...
Reply With Quote
  #2 (permalink)  
Old 08-06-10, 10:28
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2cap View Post
Userexit is enabled in our environment. I read in the document that logs in the active directory needs to be manually purged once they get moved in the other directory. But why are they automatically getting purged in our environment?
If you enable USEREXIT, it is the userexit program responsibility to delete (or not) the archived logs.

Quote:
Originally Posted by db2cap View Post
log files moves when they get full
...and also in other cases, e.g. after a backup, or when the database is deactivated.
Reply With Quote
  #3 (permalink)  
Old 08-06-10, 23:28
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
If userexit is enabled, db2 should reuse the logs in the active log directory by renaming them. Let's say, log A gets archived by userexit. When log A is no longer active (full logs are archived when they're still active) and DB2 needs to allocate a new log B, it should rename log A to log B. The archived logs can be of different size if they get truncated (at the end of an online backup, archive log command or when the database is deactivated as n_i mentioned). Truncated logs used to be deleted in older version, but they are now extended and reused.
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