Move logical-log files

You might want to move logical-log files for performance reasons or to make more space in the dbspace.

To find the location of logical-log files, run the onstat -l command. Although moving the logical-log files is not difficult, it can be time-consuming.

Moving logical-log files is a combination of two simpler actions:
  • Optionally dropping logical-log files from their current dbspace.
  • Adding the logical-log files to their new dbspace
Restriction: You cannot move logical log files into dbspaces that have non-default page sizes.

The database server must be in online, administration, quiescent, or fast-recovery mode.

You can change the location for new logical logs by setting the AUTO_LLOG configuration parameter to 1 and the name of the dbspace. The AUTO_LLOG configuration parameter enables the database server to add logical logs as needed to improve performance.

Example

The following procedure provides an example of how to move six logical-log files from the root dbspace to another dbspace, dbspace_1:

  1. Add six new logical-log files to dbspace_1 by running the following command:
    onparams -a -d dbspace_1
  2. Take a level-0 backup of all storage spaces to free all log files except the current log file. For example, you can run the following command to back up all log files, including the current log file:
    onbar -l -b -c
  3. Run the onmode -l command to switch to a new current log file.
  4. Drop all six logical-log files in the root dbspace by running the onparams -d -l command with the log file number for each log file. You cannot drop the current logical-log file.
  5. Create a level-0 backup of the root dbspace and dbspace_1. For example, you can run the following command:
    onbar -b root dbspace_1