Another error found when working on DB2.
[IBM][CLI Driver][DB2/NT64] SQL0964C The transaction log for the database is full.
When running on some big transactions, DB2 returned the above error message on DB2.
To resolve the above issue, we will need to increase the transaction log file size for that particular DB.
First check on the current log file setting using the following command. Assumption is the Database name is ABC
db2 get db cfg for ABC
A long list will be returned. Look for the following portion.
Log file size (4KB) (LOGFILSIZ) = 1024
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 12
Database page size = 32768
The formula to calculate the disk space required is as following.
disk_space_required = logfilsiz * (logprimary + logsecond) * page_size
Page_size is also is also returned in part of the list from the get db cfg command.
In this case, my current disk space required is as following.
disk_space_required = 1024 * ( 13 + 12 ) * 32768 = 800 MB.
My current setting is only can support up to 800MB transaction log file. I would like to increase it to support up to 2 GB
logfilsiz = 2GB / 32768 / 25 = 2442
Run the following command to update logfilsiz to 2442
db2 update db cfg using logfilsiz 2442
The following response will be returned.
C:\Program Files\IBM\SQLLIB\BIN>db2 update db cfg using logfilsiz 2442
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
Restart Database using the following command to reflect the latest change. ( Assuming user is DB2ADMIN and Password is ****** )
db2 restart database QUICOINT user DB2ADMIN using ******
This should fix the error. Hope this is the resolution you are looking for . Happy DB2ing .