DB2 database logs

Source: Internet
Author: User

Terminate force application all // force terminate all connections
Terminate // clear all DB2 background processes
Related details can be found in db2ic

The database is a DB2 database. When deleting a large table through Delete, the following error occurs:
DB2 "select count (*) from fix. fix_entrust"
1
-----------
999999
1 record (s) selected.

DB2 "delete from fix. fix_entrust"
Db21034e the command was processed as an SQL statement because it was not
Valid command line processor command. During SQL processing it returned:
Sql0964c the transaction log for the database is full. sqlstate = 57011

 

Solution:

Terminate the transaction explicitly: Use the commit or rollback command.
DB2 rollback
The db20000i SQL command is successfully completed.
Find the current log information:
DB2 get dB CFG for ksdbs
..................
Log File size (4 KB)
(Logfilsiz) = 1000 ***************************** need to be modified
Number of master log files
(Logprimary) = 3 **************************** need to be modified
Number of auxiliary log files
(Logsecond) = 2 *************************** (whether to modify it depends on the actual situation)
..................
Modify related parameters:
DB2 update dB CFG for ksdbs using logfilsiz 2048
The db20000i update database configuration command is successfully completed.

One or more parameters submitted for immediate modification by sql1363w are not dynamically changed. For these configuration parameters
After all applications are disconnected from this database, the changes take effect.
DB2 update dB CFG for ksdbs using logprimary 20
The db20000i update database configuration command is successfully completed.

One or more parameters submitted for immediate modification by sql1363w are not dynamically changed. For these configuration parameters
After all applications are disconnected from this database, the changes take effect.

DB2 update dB CFG for ksdbs using logsecond 5
The db20000i update database configuration command is successfully completed.

DB2 get dB CFG for ksdbs
..................
Log File size (4 kb) (logfilsiz) = 2048
Number of Primary log files (logprimary) = 20
Number of auxiliary log files (logsecond) = 5
..................

DB2 "delete from fix. fix_entrust"
The db20000i SQL command is successfully completed.

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.