How to solve the problem of full db2 transaction logs and Full Log disk space

Source: Internet
Author: User
Tags db2 transaction

How to solve the problem of full db2 transaction logs and Full Log disk space

Full transaction logs indicate that the current transaction cannot be written to the active log (the master log file and the auxiliary log file are all used up or there is not enough space for writing the current transaction)

The log disk space is full, indicating that the auxiliary log file is not used up and the disk space is full.

The transaction log files of the db2 database are classified into the primary and secondary log files. The primary log files are allocated space, and the secondary log files are distributed during use.

View the transaction log configuration (mid is the database name ):

Db2 get db cfg for mid

Running result:

Log File size (4 kb) (LOGFILSIZ) = 1024
Number of Primary log files (LOGPRIMARY) = 13
Number of auxiliary log files (LOGSECOND) = 4
The path to the log file changed (NEWLOGPATH) =
Log File Path = D: \ DB2 \ NODE0000 \ SQL00003 \ SQLOGDIR \

Total transaction log size = (LOGPRIMARY + LOGSECOND) * LOGFILSIZ * 4 k

Ps: (13 + 4) * 1024 * 4kb = 68 mb

Solutions to full DB2 transaction logs:

(1) Increase the log file size:

Db2 udpate db cfg for mid using LOGFILSIZ 8192

Or increase the number of main log files:

Db2 update db cfg for mid using LOGPRIMARY 15

Or increase the number of auxiliary log files:

Db2 update db cfg for mid using LOGSECOND 10

(2) Stop the application that caused the error or stop all applications, and then restart the database.

Db2 force applications all
Db2 force application (the application handle is obtained through db2 list applications)
Db2stop
Db2start

The preceding two solutions solve the problem of full db2 transaction logs and Full Log disk space.

Related Article

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.