IBM Security Directory Server, Version 6.3.1

DB2 transaction log size

You must tune the transaction log size for the logs to grow to their maximum allowed size.

IBM® Security Directory Server uses transaction log disk space for storing uncommitted DB2® transactions from directory update operations.

You can set the following DB2 parameters to specify the space that is required by DB2 transaction log:

To view the DB2 parameters that are associated with the DB2 transaction log and their values, run the following command:

db2 get database configuration for ldapdb2 | \
egrep 'LOGFILSIZ|LOGPRIMARY|LOGSECOND|NEWLOGPATH|Path to logfiles'
 Log file size (4KB)(LOGFILSIZ) = 2000
 Number of primary log files(LOGPRIMARY) = 8
 Number of secondary log files(LOGSECOND) = 3
 Changed path to log files(NEWLOGPATH) =

The transaction log size is limited by the values of DB2 parameters LOGFILSIZ, LOGPRIMARY, and LOGSECOND. The log size is also affected by the disk space in the directory that is specified by the NEWLOGPATH DB2 parameter.

If the transaction log size exceeds the limit that is set, the transaction is backed out by using the information in the logs. If the transaction logs exceed the limit because of the lack of disk space, the database becomes corrupted and unusable. If the database becomes corrupted, it is possible to use the DB2 commands to recover the database. The database can also be restored from a backup or reloaded. If the database becomes corrupted, you can use the recovery commands in the sqllib/db2dump/db2diag.log file. The file is in the DB2 instance owner home directory.

By default, the DB2 transaction log file size (LOGFILSIZ) is defined to 2000 blocks of 4 KB or 8000 KB per log file. The number of primary logs files (LOGPRIMARY) is defined to 8 and the number of secondary log files (LOGSECOND) is 3. To increase the DB2 transaction log limits for millions of users, it is necessary to increase the size of the transaction logs (LOGFILSIZ) and increase the number of secondary files (LOGSECOND). You must increase the number of secondary files rather than the number of primary files. It is because the secondary files periodically get deleted when not in use.

The transaction log requirements are small for a directory server with a normal workload. It is observed that runtime directory operations increases the transaction log requirements for a short time.

You can set the transaction log by running the following DB2 commands:

db2 update database configuration for LOGFILSIZE using 10000
db2 update database configuration for LOGPRIMARY using 2
db2 terminate
db2 force applications all
db2 connect to ldapdb2 db2 get database configuration for ldapdb2 | \
 egrep 'LOGFILSIZ|LOGPRIMARY|LOGSECOND|NEWLOGPATH|Path to log files'

In IBM Security Directory Server, version 6.2 and later, you can set the LOGFILSIZ and NEWLOGPATH parameters by using the idsperftune tool.



Feedback