57011 problems in DB2

Source: Internet
Author: User

57011 in DB2 yesterday I wrote a very waste of code SQL code create procedure batch_cargo () language SQL begin declare in_date date; declare his_date date; declare p_tj_date varchar (8 ); declare p_his_date varchar (8); declare p_tj_year varchar (4); declare p_tj_month varchar (2); declare p_tj_day varchar (2); declare p_his_year varchar (4 ); declare p_his_month varchar (2); declare p_his_day varchar (2); set in_date = current date-1 da Y; set his_date = current date-10 day; set p_tj_year = trim (char (year (in_date); set p_tj_month = case when month (in_date) <10 then '0' | trim (char (month (in_date) else trim (char (month (in_date) end; set p_tj_day = case when day (in_date) <10 then '0' | trim (char (day (in_date) else trim (char (day (in_date) end; set p_tj_date = p_tj_year | p_tj_month | p_tj_day; set p_his_year = trim (char (year (hi S_date); set p_his_month = case when month (his_date) <10 then '0' | trim (char (month (his_date ))) else trim (char (month (his_date) end; set p_his_day = case when day (his_date) <10 then '0' | trim (char (day (his_date ))) else trim (char (day (his_date) end; set p_his_date = p_his_year | p_his_month | p_his_day; insert into t_test_proc values (p_tj_date, p_his_date ); when the end @ process is executed, the system prompts that the application heap is not enough. SQLSTATE = 57011 Later, we modified the two parameters SORTHEAP and APPLHEAPSZ, and then it went normal.
The following figure shows the parameter description for the database heap (4 kb) (DBHEAP) = 1200 utility heap size (4 kb) (UTIL_HEAP_SZ) = 5000 Maximum Application Control Heap size (4 KB) (APP_CTL_HEAP_SZ) = 128 sorting LIST Heap (4KB) (SORTHEAP) = 2500 SQL statement heap (4KB) (sort theap) = 2048 Default Application heap (4KB) (APPLHEAPSZ) = 2048 statistics heap size (4 kb) (STAT_HEAP_SZ) = 4384

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.