Description of precautions in DB2 batch update

Source: Internet
Author: User
Tags db2 client

This article mainly tells you about the notes for DB2 batch update. If you are interested in the actual operations related to the notes for DB2 batch update, you can click to view the following articles. The following is a detailed description of the main content of the article. I hope you will have a better understanding of it after browsing.

Batch update of the DB2 client seems that at most 64 kB SQL statements can be sent to the database at a time. The following error may occur:

Batch update of the DB2 client seems that at most 64 k characters of SQL can be sent to the database at a time.

The following errors may occur, for example:

 
 
  1. db2 ? sql954  
  2. SQL0954C Not enough storage is available in the application heap  
  3. to process the statement.  
  4. Explanation:  
  5. All available memory for the application has been used.  
  6. The statement cannot be processed.  
  7. User Response:  
  8. Terminate the application on receipt of this message. Increase  
  9. the database configuration parameter ( applheapsz ) to allow a  
  10. larger application heap.  
  11. sqlcode : -954  
  12. sqlstate : 57011  

You need to set the heap size of the DB2 application.

Http://fanqiang.chinaunix.net/db/db2/2005-07-20/3430.shtml

4.8 check which databases under this instance

 
 
  1. db2 LIST DATABASE DIRECTORY [ on /home/db2inst1 ]  

4.9 view and modify the configuration of the database head

Note that, in most cases, after the data configuration is changed, it takes effect only after all connections are disconnected.

View DB2 batch update considerations head preparation

 
 
  1. db2 get db cfg for head 

Change the value of a database head setting.

4.9.1 change the size of the sorting heap

 
 
  1. db2 update db cfg for head using SORTHEAP 2048 

Change the size of the sorting heap to 2048 pages. It is better to set this value to a greater value for applications with more queries.

4.9.2 modify the transaction log size

 
 
  1. db2 update db cfg for head using logfilsiz 40000 

The size of this item must be compatible with the transaction processing of the database. if the transaction is large, it should be changed to a larger value. Otherwise, it is easy to handle errors with full log files.

4.9.3 modify the program heap memory size when the program heap memory is insufficient

 
 
  1. db2 update db cfg for head using applheapsz 40000 

The value cannot be too small, otherwise there will be insufficient memory to run the application.

4.10 view and modify database instance configurations

View DB2 batch update instance configurations

 
 
  1. db2 get dbm cfg 

Change database instance Configuration

4.10.1 enable monitoring of lock conditions.

 
 
  1. db2 update dbm cfg using dft_mon_lock on 

4.10.2 change the diagnostic error capture level

 
 
  1. db2 update dbm cfg using diaglevel 3 

0 indicates that no information is recorded.

1 indicates that only errors are recorded.

2. Record service and non-service errors

The default value is 3, which records db2 errors and warnings.

4. Record all information, including information about successful execution.

Generally, do not use 4, which will lead to a very slow running speed of db2.

The above content is an introduction to the notes for DB2 batch update. I hope you will get some benefits.

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.