Results 1 to 6 of 6

Thread: HADR Logging

  1. #1
    Join Date
    Jul 2011
    Posts
    9

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    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.

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

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