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 > HADR Logging

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-11, 06:27
babybug babybug is offline
Registered User
 
Join Date: Jul 2011
Posts: 9
HADR Logging

Hi,

Does anyone know how DB2 logging works when configuring HADR? What will happen if we use infinite logging and the storage gets full considering hundreds of transactions per day?
Since "Archive Logging" is needed for the HADR, once I delete some log files manually HADR breaks down. Thus, we cannot not manually delete log files.

Thanks a lot
Reply With Quote
  #2 (permalink)  
Old 09-17-11, 12:03
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I don't believe that you can use infinte logging with HADR. Use LOGARCHMETH1 to archive the logs with HADR, then you can prune the logs from the log archive path when necessary. However, make sure you keep enough logs in the archive log path, that if the standby is down for an extended period, that DB2 can access them for when it goes into HADR catch-up mode when the standy is reconnected (otherwise you will have to recreate the standby with a backup/restore).
__________________
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
  #3 (permalink)  
Old 09-18-11, 00:16
babybug babybug is offline
Registered User
 
Join Date: Jul 2011
Posts: 9
Thanks for the info Marcus. After I configured archive logging for the HADR, I checked DB parameters confirming that LOGARCHMETH1 is set to the primary "Log Archive" path (which can be safely removed) and LOGARCHMETH2 is OFF. Could you direct me on how to remove logs from the "Logging Location" path?

The "Logging Location Path" is asked on step 4 of Database Logging Wizard with /db2inst1/NODE0000/SQL00001/SQLOGDIR as the default path, and the "Log Archive Path" is set on the step 2.

Respect
Reply With Quote
  #4 (permalink)  
Old 09-18-11, 00:36
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You don't remove logs from the log path. DB2 will automatically move (archive) logs from the log path to the log archive path (specified with LOGARCHMETH1) when it needs to. You only need to purge logs from the path specified in the LOGARCHMETH1 parm.
__________________
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
  #5 (permalink)  
Old 09-18-11, 01:41
babybug babybug is offline
Registered User
 
Join Date: Jul 2011
Posts: 9
That's exactly what I was looking for. I was not sure what to do with log files in the logging path to free more space.
Last thing:
What would you recommend for the size of each log file and the number of primary/secondary files assuming 300,000 transactions with a minimum requirement of 1GB storage per day? Is there special considerations I should take into account on such a scenario particularly for logging?

Greatly appreciative for your help.
Reply With Quote
  #6 (permalink)  
Old 09-19-11, 02:55
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
have a look at best practices in the doc..
there are some recommendations on logfilsiz and archive interval (not with hadr)
in hadr we transfer the logbuffer and do not wait the logfile to fill
logfilsiz and quantity is more important when not using hadr and needed to reduce recovery time
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
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