Moving Db2 transaction log files for good performance

Periodically move old Db2 transactional logs that the IBM® Security Guardium® Key Lifecycle Manager database creates. Otherwise, large numbers of transactional logs might affect performance.

About this task

Db2 transactional logs occur in these directories:

Windows systems:
INSTANCEHOME:\sklmdbarchive\KLMDB42\KLMDB42\NODE0000\LOGSTREAM0000\C0000000

where:

  • INSTANCEHOME is the drive letter that you specified during the installation.
  • KLMDB42 is the database instance owner.
  • KLMDB42 is the name of the IBM Security Guardium Key Lifecycle Manager database.
  • NODE0000, LOGSTREAM0000, and C0000000 might be different on your system.
Systems such as Linux or AIX:
~sklmdbarchive/klmdb42/KLMDB42/NODE0000/LOGSTREAM0000/C0000000

Where,

  • KLMDB42 is the database instance owner.
  • KLMDB42 is the name of the IBM Security Guardium Key Lifecycle Manager database.
  • NODE0000, LOGSTREAM0000, and C0000000 might be different on your system.

If IBM Security Guardium Key Lifecycle Manager manages many keys and if the disk partition that contains the sklmdbarchive directory has low free disk space, move the old transaction logs to a different disk partition.

Note: As you carry out this task, be careful not to move the current active log.

Take these steps on a periodic basis:

Procedure

  1. Create an IBM Security Guardium Key Lifecycle Manager backup by using the graphical user interface, command-line interface, or REST interface. Otherwise, the next backup might fail.
  2. Log in as the database instance owner on systems such as Linux or AIX, or the Db2 administrator on Windows systems.
  3. Create a directory on another partition that has adequate disk space to which you can move old log files.
  4. Identify the first active log. Type:
    Windows systems:
    db2cmd
    SET DB2INSTANCE=KLMDB42
    db2 get db cfg for klmdb42 
    Systems such as Linux or AIX:
    db2 get db cfg for klmdb42 

    The value for the configuration parameter First active log file identifies the first active log.

  5. Move the log files that are modified earlier than the first active log from the sklmdbarchive directory to the new directory.

    Logs are named Snnnnnnn.LOG. Usually, the lower numbered logs are created earlier than higher numbered logs. The exception is if the database already created a log named S99999999.LOG. In this case, the numbering restarts at S0000000.LOG.

    Note: Running a restore operation removes the sklmdbarchive directory and creates a new directory.