Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2010
    Posts
    36

    Unanswered: logging parameters

    Can you advice what are recommended values of LOGPRIMARY and LOGSECOND?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    It depends on a lot of things. One size does NOT fit all.

    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    (LOGPRIMARY + LOGSECOND) X LOGFILSIZ X 4096 should be slightly less than the total amount of logspace available on the mount point defined for logging.

    Becasue it takes a certain amount of time for DB2 to archive logs and to be able to reuse and/or rename them, I would suggest that you use at least least 5 for LOGPRIMARY and the rest for LOGSECOND. The descision about how many for LOGPRIMARY depends on the LOGFILSIZ. If LOGFILSIZ is 20000 pages, then LOGPRIMARY of 5 is usually enough, but it depends somewhat on the rate of changes of your database. If you leave LOGFILSIZ at the default, then you will want a lot more than 5 for LOGPRIMARY . If you are processing 10,000 changes per second to your database, you may want more than 5 for LOGPRIMARY even if your LOGFILSIZ is 20000.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Sep 2010
    Posts
    36
    Can you advice how to set LOGFILSIZ - small LOGFILSIZ with higher LOGPRIMARY or high LOGFILSIZ with smaller LOGPRIMARY?

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Noone can tell you that. Monitor your database and choose the log size so that log switch frequently enough to ensure your recovery time target and no more. Then monitor some more to ensure that your sustained transaction load is completely served by primary log files. Add secondary files to accommodate your longest transaction.

  6. #6
    Join Date
    Nov 2011
    Location
    Shen Zhen,China
    Posts
    37
    agree with above brothers,

    it depend on the type of you database,OLTP,OLAP,Data warehouse。。。

    you have to monitor ur database and tune it accordingly.

Posting Permissions

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