When executing a large SQL transaction, DB2 sometimes reports an error:
The transaction log for the database was full. sqlcode=-964, sqlstate=57011, driver=4.12.79 This error is caused by: When a large SQL transaction is executed, the database will log the execution before committing. Convenient in case of unsuccessful rollback after execution. However, the log size will be limited, once the maximum log file limit is reached, but the transaction is still not completed, the above error will be reported. Error resolution: (1) first connect to DB2 database: &NBSP;DB2 connect to <db name> user <username> using <passwd> (2) Read log-related profiles &NBSP;DB2 get db cfg for <db Name> ; | grep log (3) variables involving log size have the following logfilsiz: The size of a single log file LOGPRIMARY: Number of main log files logsecond: Number of auxiliary log files Total log size: (LOGPRIMARY + logsecond) * logfilsiz * 4kb (4) Modify the contents of the above three variables Changes before you need to pay attention to a few things: A) connected users must have DBA Authority; b) when setting parameter values, take into account the size of their hard disk Specific operation instructions for: &NBSP;DB2 update DB CFG for <db name> using <parametre> <value> For example: DB2 update DB CFG for SEAT using LOGFILSIZ 10240
DB2 Log Full workaround