Log Configuration

You can configure the logs LOGFILSIZ, LOGPRIMARY, LOGSECOND, and NUM_LOG_SPAN.

This topic provides information about the following logs:
  • LOGFILSIZ, LOGPRIMARY, LOGSECOND
  • NUM_LOG_SPAN

LOGFILSIZ, LOGPRIMARY, LOGSECOND

At a minimum, configure 20 transaction logs (LOGPRIMARY=20) of 256 MB (LOGFILSIZ=65536 4K-pages) for Sterling B2B Integrator.

As an additional precaution, configure at least 12 secondary transaction logs (LOGSECOND=12). DB2® allocates secondary logs when it cannot reuse any of the primary logs due to active transactions.

Track the following monitor elements to assess the effectiveness of these settings, and adjust as needed:
  • total_log_used and tot_log_used_top to see how much of the logs are used
  • Which workloads are consuming or holding the transaction logs when LOGPRIMARY approaches the total primary log capacity. If needed, raise the setting for LOGPRIMARY.
  • sec_log_used_top and sec_logs_allocated to see if secondary transaction logs are used. Investigate how often logging spills over to the secondary logs and what workloads are running during the spill. If needed, increase LOGPRIMARY to prevent log spills.

NUM_LOG_SPAN

This parameter limits the number of logs a transaction can span, which prevents situations where DB2 cannot switch transaction logs because all the transaction logs are active. For example:
  • Someone may have updated a record in IBM® Sterling Control Center, but may have forgotten to commit the change.
  • Updates to one or more database records might not get committed due to a software bug.

Set NUM_LOG_SPAN to a minimum of 12 so that valid long-running transactions are not prematurely forced, and a maximum of LOGPRIMARY minus a safety buffer. For example, if LOGPRIMARY=20 and you decide upon a safety buffer of 4, the maximum NUM_LOG_SPAN=16.