SQL0964C The transaction log for the database is full. SQLSTATE=57011

The database log file is not large enough for the application or due to the transaction to delete / update rows in the table is overfilling the transaction logs. This error can be solved by increasing of LOGFILSIZ, LOGPRIMARY, and LOGSECOND .

To get the DB2 log file configuration, from a DB2 command prompt, run the following command


db2 get db cfg for dbname | grep -i log

The output related to log file is displayed as follows .

Log file size (4KB) (LOGFILSIZ) = 1000
Number of primary log files (LOGPRIMARY) = 3
Number of secondary log files (LOGSECOND) = 2

In the above configuration , number of Primary Logs are 03 and Number of Secondary Logs are 02 .

Steps to increase number of Primary Logs / Secondary Logs

1. Stop all the DB2 applications. The following command is used to stop all the applications

db2 force applications all

2) Increase LOGPRIMARY, LOGSECOND as per your requirement, if need, increase size of  LOGFILSIZ. The following commands are used to update the log primary & log secondary.

db2 update db cfg for dbname using logprimary <value>

db2 update db cfg for dbname using logsecondary <value>

db2 update db cfg for dbname using logfilesize <size>


for Eg:
db2 update database config for ldapdb2 using LOGFILSIZ 5000

db2 update database config for ldapdb2 using LOGPRIMARY 5
db2 update database config for ldapdb2 using LOGSECOND 10
     

3) Restart DB2 using db2stop and db2start.

Comments

Popular posts from this blog

Db2 export command example using file format (del , ixf)

How to fix DB2 Tablespace OFFLINE state issue?

How to determine fenced User-ID of a DB2 instance