The log volumes of a database form the log area. The database system stores the redo log entries (after images) in the log area.
The general database parameter MaxLogVolumes specifies the maximum number of log volumes you can configure for a database. More information: Database Administration, General Database Parameters
To speed up the writing of log entries to the log area, you can divide the log area into several log partitions. Multiple log writer tasks can then write log entries in parallel to the different log partitions.
To configure the maximum number of log partitions, use the special database parameter MaxLogWriterTasks (see Database Administration, Special Database Parameters).
One log partition can consist of one or multiple log volumes and, if applicable, the related mirrored log volumes. When creating a log volume, you assign it to a log partition. If you do not assign the first log volume to a partition, the system automatically assigns it to the first log partition. Note that later, you cannot move log volumes from one log partition to another.
Log Partitions
Usually one log writer belongs to one user kernel thread (UKT) and writes to one log partition.
For more information, see Database Manager CLI, db_addvolume
The system distributes the redo log entries among all the log partitions, and within the log partitions among all the log volumes.
The redo log entries are written to the log volumes by the log writer tasks. The system uses one log writer task for each log partition, which means that log partitions are written in parallel. If the log partitions are on different hard disks, you can thus improve the performance.
Log Partitions
The system overwrites the log partitions cyclically. However, redo log entries in the log area can only be overwritten once they have been backed up.
If you do not perform any log backups, the database system will at some stage have filled up one of the log partitions with redo log entries, and the database comes to a stand-still. Therefore regularly perform log backups or activate automatic log backup.
Database Administration, Backing Up Log Entries
Database Studio, Activating or Deactivating Automatic Log Backup
Database Manager CLI, autolog_on
Note
When a log partition is full, you have to perform a log backup. Adding a new log volume does not help: The current write position is usually not the place at which the system adds the new log volume.
Log partition is full (LOG FULL situation), and the system cannot use a new log volume yet
The system uses log segments for automatic log backup. After as many redo log entries as were configured in the log segment size were written to the log area, the system starts a log backup (otherwise after the time specified).
You configure the size of the log segments with the general database parameter AutoLogBackupSize. It is unrelated to the size of the individual log volumes, but may not exceed the total of all log volumes. Make sure that enough space remains in the log area when a log segment is being backed up to receive any new redo log entries that are written during the backup.
More information: Database Administration, General Database Parameters
You can also set the overwrite mode for the log area, so that the database system overwrites the log area without first performing log backups. Note, however, that this interrupts the backup history, and you can no longer restore the database to its most recent state: If a hard disk is damaged, you may lose data.
Recommendation
Only activate overwrite mode in special situations, and only for as long as is absolutely necessary.
For the security of your data, we recommend that you mirror the log area. If hardware-based mirroring is not possible, the database system can mirror the log area.
Name |
Description |
---|---|
Log mode |
Specifies whether the database system supports software-based mirroring of the log volumes.
|
Overwrite mode for the log area |
Specifies whether the database system can overwrite redo log entries in the log area even if they have not been backed up.
If overwrite mode is on and you switch it off, you then have to carry out a complete data backup. |
Redo log management |
Specifies whether the database system writes redo log entries.
If redo log management is off and you switch it back on, you then must carry out a complete data backup. |