Db2 Memory Allocation Error
Contents |
Topic: DB2 11.1 - memory allocation error No replies Display:ConversationsBy Date 1-1 of 1 Previous Next Rudolf Bargholz 060000W2MA 5 Posts Pinned topic DB2 11.1 - memory allocation error 2016-07-29T10:09:52Z | Tags:
Memory Allocation Error C++
Answered question This question has been answered. Unanswered question This question has
Memory Allocation Error Wordpress
not been answered yet. Hi, I am getting a memory allocation error in a very simple SQL. memory allocation error windows 7 Windows 10 x64 DB2 11.1 Express C C:\Users\rb>db2level DB21085I This instance or install (instance name, where applicable: "DB2") uses "64" bits and DB2 code release "SQL11010" with level http://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.messages.sql.doc/doc/msql00083c.html identifier "0201010F". Informational tokens are "DB2 v11.1.0.1527", "s1606081100", "DYN1606081100WIN64", and Fix Pack "0". Product is installed at "C:\PROGRA~1\IBM\SQLLIB" with DB2 Copy Name "DB2OLTS". Here the SQL that is failing: update DOCUMENTS set DOC_DOCTYP=0 where DOC_DATE='2001-12-12' and DOC_DOCTYP is null A memory allocation error has occurred. SQLCODE=-83, SQLSTATE= , DRIVER=3.69.56 A select * from DOCUMENTS where DOC_DATE='2001-12-12' and DOC_DOCTYP https://www.ibm.com/developerworks/community/forums/html/topic?id=8e2f0af3-f05d-4b77-9691-c9d869b61ad7 is null returns no records, so I have no idea what memory allocation problems DB2 might be having when updating no records. The table has 90183 rows, but as I mentioned, even though no records are being updated, a memory allocation error occurs. This is a new database, and the data was imported using db2move LOAD. I have run a REORG and RUNSTATS on the table, but the error persists. Attached thedb2diag.log (db2diag.error.log) with information about the error. I renamed the file just before issuing the SQL, so the file only contains data directly pertaining to the error. If someone needs a more detailed db2diag.log, I can supply a more complete file. Attached also the DDL of the relevant table (DDL_DOCUMENTS.sql) Attached the "get dbm cfg" and "get db cfg" for this database (db_and_dbm_cfg.txt) Here an extract of the db2diag: 2016-07-29-11.30.06.330000+120 I1169F4497 LEVEL: Warning PID : 3884 TID : 6308 PROC : db2syscs.exe INSTANCE: DB2 NODE : 000 DB : RMRSH APPHDL : 0-26 APPID: *LOCAL.DB2.160729085404 AUTHID : DB2ADMIN HOSTNAME: ANAND EDUID : 6308 ED
20, 2012 · Updated November 15, 2012 I used to think that if I could just get enough details into a spreadsheet, I could tell exactly how http://db2commerce.com/2012/11/20/looking-at-how-much-memory-db2-is-using/ much memory DB2 would be using at any point in time. I gave up on the spreadsheet idea long ago, though when I was working with 32-bit systems and their limit of ~2GB for the most critical memory areas, I did use a simplified spreadsheet when adjusting to make sure I could keep it under the 2GB. Thankfully, 64-bit databases mean that I memory allocation am less likely to have to rob bufferpools to give memory to sorts or vice-versa. Also, I use STMM and automatic settings for many areas on my one-database->one-instance->one-server systems. But even with these advances it is best to understand DB2's memory model and have the real-world commands to figure out what is going on. DB2's Memory Model There is a lot of good memory allocation error material on this, so I am not going to go into a full description here. I suggest this developerWorks article as a great read on this: http://www.ibm.com/developerworks/data/library/techarticle/dm-0406qi/ The way I think of it, there are basically three types of memory areas - ones that are allocated at the instance level, ones that are allocated at the database level, and ones that are allocated at the application level. Instance level memory areas include: AUDIT_BUF_SZ MON_HEAP_SZ FCM areas Database level memory areas include: Size of bufferpools LOCKLIST DBHEAP UTIL_HEAP_SZ PCKCACHESZ SHEAPTHRES_SHR CATALOGCACHE_SZ Application level memory areas include: APPLHEAPSZ STMTHEAP STAT_HEAP_SZ Private Sort Heaps (SHEAPTHRES and SORTHEAP) AGENT_STACK_SZ ASLHEAPSZ RQRIOBLK Why there is no exact way to say "DB2 should be using X memory at any given time"? It took me a while to understand this. There are two big reasons you cannot just add up parameters as configured in DBM and DB configurations and say exactly how much memory DB2 should be using at any one time. Some memory areas are allocated only as applications connect or agents are started up, and the number of connected applications can