mirrorlogpath - Mirror log path configuration parameter

This parameter specifies a string of up to 242 bytes for the mirror log path. The string must point to a fully qualified path name.

Configuration type
Parameter type
Default [range]
Null [any valid path or device]

In both Db2® pureScale® environments and Db2 Enterprise Server Edition environments, the database partition number and a log stream ID are automatically appended to the path, for example, /home/dbuser/dblogs/NODE0000/LOGSTREAM0000/.

If you set the value of the mirrorlogpath configuration parameter, the Db2 database system creates active log files in both the log path and the mirror log path. All log data is written to both paths. The mirror log path has a duplicate set of active log files, such that if there is a disk error or human error that corrupts active log files on one of the paths, the database can still function.

In a Db2 pureScale environment, the first member connecting to or activating the database processes the changes to the value of this log path parameter. The Db2 database manager verifies that the path exists and that it has both read and write access to that path.

The database manager also attempts to create member-specific subdirectories for the log files. If any one of these operations fails, the Db2 database manager rejects the specified path and brings the database online using the old path. If the database manager accepts the specified path, the new value is propagated to each member. If a member fails while trying to switch to the new path, subsequent attempts to activate it or to connect to it fail with SQL5099N. All members must use the same log path.

If you change the mirror log path, there might be log files in the old mirror log path. These log files might not have been archived, so you might need to archive these log files manually. Also, if you are running replication on the related database, replication might still need the log files from before the log path change. If you configured the database to use log archiving and either the Db2 database system automatically archived all the log files or you archived them manually, the Db2 database system can retrieve the log files to complete the replication process. Otherwise, you can copy the files from the old mirror log path to the new mirror log path.

If the logpath or newlogpath configuration parameter specifies a raw device as the location where the log files are stored, mirror logging, as indicated by the mirrorlogpath configuration parameter, is not allowed. If the logpath or newlogpath configuration parameter specifies a file path as the location where the log files are stored, mirror logging is allowed, and the mirrorlogpath configuration parameter must specify a file path.

The mirrorlogpath configuration parameter affects log archiving behavior when you also set the logarchmeth2 configuration parameter. When you set the values of both the mirrorlogpath and logarchmeth2 configuration parameters, the logarchmeth2 configuration parameter archives log files from the mirror log path instead of archiving additional copies of the log files in the active log path. You can use this log archiving behaviour to improve resilience during rollforward recovery, because a usable archived log file from the mirror log path might still be available to continue a database recovery operation even if a primary log file became corrupted before archiving.

  • Just like the log files, the mirror log files should be on a physical disk that does not have high I/O.
  • It is strongly recommended that the mirror log path and the primary log path be on separate devices.
You can use the database system monitor to track the number of I/Os related to database logging. The following data elements return the amount of I/O activity related to database logging.
The number of log pages read.
The number of log pages written.
You can use an operating system monitor tool to collect information about other disk I/O activity, and then compare the two types of I/O activity.