logsecond - Number of secondary log files configuration parameter
This parameter specifies the number of secondary log files that are created and used for recovery log files. The secondary log files are created only as needed.
- Configuration type
- Parameter type
- Configurable Online
- Propagation class
- Default [range]
[-1; 0 - 254
]Note: The default value is subject to change by the Db2® Configuration Advisor after initial database creation.
- Unit of measure
- When allocated
- As needed when logprimary is insufficient. For more allocation details, see the details that follow.
- When freed
- Over time as the database manager determines which secondary log files are no longer needed.
When the primary log files become full, the secondary log files (of size logfilsiz) are allocated one at a time as needed, up to a maximum number as controlled by this parameter. If more secondary log files are required than are allowed by this parameter, an error code will be returned to the application.
If your log path is a raw device, you must configure the overflowlogpath configuration parameter in order to set logsecond to -1.
By setting logsecond to -1, you will have no limit on the size of the unit of work or the number of concurrent units of work. However, rollback (both at the savepoint level and at the unit of work level) could be very slow due to the need to retrieve log files from the archive. Crash recovery could also be very slow for the same reason. The database manager writes a message to the administration notification log to warn you that the current set of active units of work has exceeded the primary log files. This is an indication that rollback or crash recovery could be extremely slow.
To set logsecond to -1, the logarchmeth1 configuration parameter must be set to a value other than OFF or LOGRETAIN.
When infinite logging is enabled (logsecond to -1), the database manager does not reserve active log space for transactions that might need to roll back and write log records. During rollback processing, if both the active log path and archive target are full (or if the archive target is inaccessible), then the blk_log_dsk_ful (block on log disk full db configuration parameter) should also be ENABLED to avoid database failures.