Size and number of dynamically added log files
The purpose of enabling dynamic logs with the DYNAMIC_LOGS configuration parameter is to add enough log space to allow transactions to roll back.
When
dynamically adding a log file, the database server uses the following
factors to calculate the size of the log file:
- Average log size
- Amount of contiguous space available
If the logical log is low on space, the database server
adds as many log files as necessary to allow the transaction to roll
back. The number of log files is limited by:
- The maximum number of log files supported
- The amount of disk space for the log files
- The amount of free contiguous space in the root chunk
If the database server stops adding new log files because it is out of disk space, it writes an error message and sets off an alarm. Add a dbspace or chunk to an existing dbspace. Then the database server automatically resumes processing the transaction.
The reserve pages in the root chunk store information about each log file. The extents that contain this information expand as more log files are added. The root chunk requires two extents of 1.4 megabytes each to track 32,767 log files, the maximum number supported.