Transaction log files for the database
Transaction log files provide you with the ability to recover your environment to a consistent state and preserve the integrity of your data. Log file storage must be optimized because log files are written sequentially, and the database manager reads log files sequentially during database recovery.
Parameter | Description |
---|---|
NEWLOGPATH |
This parameter is used to change the log path to create the transaction log files on a separate partition/volume than the default volume or the one used for database table space containers. Set it to a directory that is the destination of log files. Make sure that the directory is created before you set it. Make sure that there is enough space on the destination before you set the new log path. For example: |
LOGFILSIZ |
This parameter defines the size of each primary and secondary log file. The size of these log files limits the number of log records that can be written to them before they become full and a new log file is required. Set it to 30000 if it is a development/test database otherwise set it to 60000. The size is number of pages each of size 4 KB. For example: |
LOGPRIMARY |
The primary log files establish a fixed amount of storage that is allocated to the recovery log files. This parameter enables you to specify the number of primary log files to be pre-allocated. Set it to 20 if it is a development database otherwise set it to 40. For example: |
LOGSECOND |
This parameter specifies the number of secondary log files that are created and used for recovery log files (only as 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. Set its value to 2. For example: |
db
configuration
changes with db2stop and db2start commands:db2stop force
db2start
Parameter | Small | Medium | Large |
---|---|---|---|
LOGFILSIZ | 30000 | 60000 | 70000 |
LOGPRIMARY | 30 | 40 | 50 |
LOGSECOND | 2 | 2 | 2 |
Total Space Required | 3.7 GB | 9.6 GB | 13.8 GB |