Solve the problem that the DB2 SQLCODE =-964 log file is full

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


To solve the problem of full DB2 SQLCODE =-964 log files, use the following code in the program: www.2cto.com insert into a select * from B where ...... there are more than 6 million records inserted into Table a each time. Every time you execute this statement, DB2 returns an error code with the SQLCODE value of-964. Run the db2 sql0964 command to check the cause of the error, DB2 is interpreted as SQL0964C The transaction log for the database is full. then, expand the log file size and the number of log files according to the DB2 instructions. The command is as follows: SQL code db2 update db cfg for MY_DATABASE using LOGFILSIZ 7900 db2 update db cfg for MY_DATABASE using LOGPRIMARY 30 db2 update db cfg f Or MY_DATABASE using LOGSECOND 20 adds that the total log file of the circulating log www.2cto.com is expanded to about GB, and then runs the following command (release the program, close, and restart the data ): SQL code db2 "force application all" db2stop db2start db2 connect to MY_DATABASE user db2inst1 uing db2inst1 the last call contains insert... select... statement stored procedures, the program is executed this time, but the efficiency is too slow. When using cyclic logs, you can consider adjusting the database's commitcount parameter.
 

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.