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 > logging parameters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-11, 12:31
shamikp shamikp is offline
Registered User
 
Join Date: Sep 2010
Posts: 12
logging parameters

Can you advice what are recommended values of LOGPRIMARY and LOGSECOND?
Reply With Quote
  #2 (permalink)  
Old 12-16-11, 12:51
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
It depends on a lot of things. One size does NOT fit all.

Andy
Reply With Quote
  #3 (permalink)  
Old 12-16-11, 12:57
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
(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
Reply With Quote
  #4 (permalink)  
Old 12-16-11, 13:40
shamikp shamikp is offline
Registered User
 
Join Date: Sep 2010
Posts: 12
Can you advice how to set LOGFILSIZ - small LOGFILSIZ with higher LOGPRIMARY or high LOGFILSIZ with smaller LOGPRIMARY?
Reply With Quote
  #5 (permalink)  
Old 12-16-11, 14:31
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #6 (permalink)  
Old 12-17-11, 08:02
wolaos123 wolaos123 is offline
Registered User
 
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.
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