DB2 Log Full Solution

Source: Internet
Author: User
Tags db2 db2 connect db2 connect to

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&gt ; | 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.