num_log_span - Number log span configuration parameter

This parameter specifies whether there is a limit to how many log files one transaction can span, and what that limit is.

Configuration type
Parameter type
  • Configurable online
  • Configurable by member in a Db2® pureScale® environment
Propagation class
Default [range]
0 [0 - 65 535]
Unit of measure

If the value is not 0, this parameter indicates the number of active log files that one active transaction is allowed to span.

If the value is set to 0, there is no limit to how many log files one single transaction can span.

If an application violates the num_log_span configuration, the application is forced to disconnect from the database and the transaction is rolled back.

Note: You can use the Db2 Workload Manager (WLM) threshold UOWTOTALTIME to force an application past a set threshold, if the application violates the num_log_span limit.

This parameter, along with the max_log configuration parameter, can be useful when enabling infinite active logspace. If infinite logging is on (that is, if logsecond is set to -1) then transactions are not restricted to the upper limit of the number of log files (logprimary + logsecond). When the value of logprimary is reached, Db2 starts to archive the active logs, rather than failing the transaction. This can cause problems if, for example, an application contains a long running transaction that is left uncommitted. If this occurs, the active logspace continues to grow, possibly leading to poor crash recovery performance. To prevent this, you can specify values for one or both of the max_log or num_log_span configuration parameters.

The following Db2 commands are excluded from the limitation imposed by the num_log_span configuration parameter:
  • LOAD
Note: Advanced Log Space Management (ALSM) helps to minimize application failures caused by log full errors (SQL0964N). These log full errors are caused by long running transactions that hold back the active log space. The NUM_LOG_SPAN parameter specifies whether there is a limit to how many log files one transaction can span, and what that limit is. When using ALSM, ensure that the NUM_LOG_SPAN parameter is not set to a value that causes a transaction to be rolled back before log extraction happens.