I'm new to this forum.
BTW, I develop an application with so many Stored procedures and have memory issues.
I used a heap profiler application and find Db2 driver (JCC) allocate 65560 bytes in memory.
Then I Find the specific Store procedure that cause this problem, when i comment Types.CHAR and Types.VARCHAR from Stored procedure(SP) and changed my application source, the problem fixed.
But, I want to used those types(Types.CHAR and Types.VARCHAR) in my SP and do not know how can fix the problem.
I found that DB2 driver 9.x has an ability to set "maximum number of bytes to use for INOUT or OUT stored procedure parameters" with parameter key "charOutputSize".
But this parameter key is for "INOUT or OUT stored procedure parameters" and i used IN parameter.
I used db2 v9.1 on server side and check all version of db2 drivers(8.1 and 9.1 and 9.5) on application side, but this problem still remain.
I changed my source to pure java Store procedure calling (using connection to create a CallableStatement) but the problem still remain.
The profiler shows that "com.ibm.db2.jcc.a.tf.execute()" create 65560 bytes on db2jcc v8.1 and similar (with minor package difference) on other drivers.
Thanks to help me.
Amir h. Ahmadi
Pinned topic Problem with JCC driver Memory Allocation on CHAR data in Stored procedure
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-10-06T07:17:39Z at 2011-10-06T07:17:39Z by SystemAdmin