DB2 Sqlcode: -964, Sqlstate: 57011 (transaction log for the database is full)

By | February 8, 2017

I got this error while doing some performance tests on a high volume system using DB2. This is the usual unintuitive error that IBM likes to give to the users 🙂
IN plain English this means that “The transaction log for the database is full.”
This appears when you have to execute UPDATE or INSERT operations that have a big amount of data. If you cannot break the operation in smaller data blocks then the alternative is to increase the transaction log.

STEP 1:
Determine the current size of the database log file


su - db2inst1
db2 connect to MMS
db2 get db config for MMS | grep -i logfilsiz

My database OS user is db2inst1, and database MMS. If you do not know the name of the database or you have more than one you can find out the name of the database using:


su - db2inst1
db2 list db directory

Usually the size is 1024. You can start from there and first maybe double it. Do not make the log file too big , you may run into some other issues.

To increase the transaction log:


db2 UPDATE db cfg for MMS using LOGFILSIZ 8000

That is all.

One thought on “DB2 Sqlcode: -964, Sqlstate: 57011 (transaction log for the database is full)

  1. Pingback: DB2: Limit an UPDATE/DELETE query in DB2 | blog.voina.org

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.