Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IT07662 Status: Geschlossen

CURSOR VARIABLES REFERENCED EXTERNALLY CAN CAUSE MEMORY LEAK IN THE
APPLICATION HEAP.

Produkt:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problembeschreibung:
Memory blocks in the application heap might keep growing if an 
application calls a procedure which returns cursor variable(s). 
The db2pd shows the following 4 kinds of memory blocks keep 
increasing if users is hitting this problem. 
 
$ db2pd -db <dbname> -memblock appl 1 sort 
 
Memory blocks sorted by size for apph pool: 
PoolID PoolName  TotalSize(Bytes)  TotalCount LOC   File 
1      apph      216000            1000       1159  1043897861 
1      apph      120000            1000       11229 4262186386 
1      apph      64000             1000       1216  1043897861 
1      apph      24000             1000       10832 4262186386 
 
The steps below illustrates a scenario to hit the issue. 
 
1. Create a procedure which returns an open cursor. 
 
db2 connect to <dbname> 
db2 -td@ -vf p1.sql 
---------------------------- 
CREATE OR REPLACE PROCEDURE PROC1(OUT CUR1 CURSOR) 
MODIFIES SQL DATA 
LANGUAGE SQL 
BEGIN 
  SET CUR1 = CURSOR WITH HOLD FOR VALUES CURRENT TIMESTAMP; 
  OPEN CUR1; 
END @ 
---------------------------- 
 
2. Call the procedure like as below, and keep the database 
connection. 
 
    try{ 
        cstmt = conn.prepareCall("CALL PROC1(?)"); 
        cstmt.registerOutParameter(1, DB2Types.CURSOR); 
        cstmt.execute(); 
        rs = (ResultSet)cstmt.getObject(1); 
        System.out.println( rs.getString(1)); 
    } catch (Exception e){ 
        e.printStackTrace(); 
    } finally{ 
        rs.close(); 
        cstmt.close(); 
    }
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Please upgrade to DB2 V10.5 fixPack 7 or later.              * 
****************************************************************
Local-Fix:
Please disconnect the application from the database to free up 
the application heap.
Lösung
This problem was first fixed in DB2 V10.5 FixPack 7.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
12.03.2015
03.02.2016
03.02.2016
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.5.0.7 FixList