Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2011
    Posts
    29

    Unanswered: Result set closed exception

    Looking on the help regarding below error:
    com.ibm.db2.jcc.am.SqlException: [jcc][t4][10120] [10898][4.11.77] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

    We are using db2 9.7 and getting this error when fetching data from the db2 table.. Sometimes we are able to fetch records correctly and sometimes getting the above error..

    Thanks in advance

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    try to collect sqlca with additional info when error occures -4470 can have many reasons
    might be some info in diag.log
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jan 2011
    Posts
    29

    Result set closed exception

    These are the error and warning messages found in the diaglog:

    2011-11-21-04.48.51.741684-360 E2550463613E634 LEVEL: Warning
    PID : 3029 TID : 47827283601728PROC : db2sysc
    INSTANCE: db2inst3 NODE : 000 DB : VRB2
    APPHDL : 0-800 APPID: *LOCAL.DB2.111025072007
    AUTHID : DB2INST3
    EDUID : 69 EDUNAME: db2stmm (VRB2)
    FUNCTION: DB2 UDB, Self tuning memory manager, stmmCheckIfFreeMemoryIsEnoughForSizeIncr, probe:667
    MESSAGE : ZRC=0xFFFFEC49=-5047
    DATA #1 : String, 143 bytes
    There is not enough free memory for size increase. Free memory in pages: Physical memory = 0, Instance memory = 264082, Database memory = 11200

    2011-11-21-04.48.51.742280-360 I2550464248E626 LEVEL: Error
    PID : 3029 TID : 47827283601728PROC : db2sysc
    INSTANCE: db2inst3 NODE : 000 DB : VRB2
    APPHDL : 0-800 APPID: *LOCAL.DB2.111025072007
    AUTHID : DB2INST3
    EDUID : 69 EDUNAME: db2stmm (VRB2)
    FUNCTION: DB2 UDB, Self tuning memory manager, stmmUpdateDBConfig, probe:275
    MESSAGE : ZRC=0x82AE00A7=-2102525785=STMM_CONFIG_UPDATE_FAILED
    "An attempted configuration update failed"
    DATA #1 : String, 75 bytes
    Error updating parameter Sheapthres_shr, updateValue = 271, sqlcode = -5047

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    There is not enough free memory for size increase. Fr...
    what more do you need...????
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jan 2011
    Posts
    29

    Result set closed

    When i googled i found the following:
    Cause:
    The IBM Data Server Driver for JDBC and SQLJ conforms to the JDBC standard to have the cursor automatically closed when all rows have been retrieved from a ResultSet. When ResultSet.next is executed after the cursor is closed this SQLException is thrown.
    Resolving the problem:
    Modify the application code to conform to the JDBC standard and do not call ResultSet.next after all rows have been retrieved.

    Then is it problem with less memory? or any other driver related issues?

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    nothing todo with driver
    stmm tries to adjust memory for specific memory block and gets error...
    Sheapthres_shr,
    sheapthres_shr - Sort heap threshold for shared sorts configuration parameter
    pd/psi is good for you....
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  7. #7
    Join Date
    Jan 2011
    Posts
    29

    Result set closed exception

    SHEAPTHRES value was 0 and I updated to 250 and restarted the db. Received the same result set closed exception. This exception we got in test instance where we have many number of databases and having more number of appliaction users.

    Today we tested in local instance and found the same exception, there we have a single database and only one application user. And in diaglog not found any memory related errors, instead found the below error:

    [12:13] 2011-11-22-11.55.12.917000+330 E4957666H535 LEVEL: Error (OS)
    PID : 2660 TID : 636 PROC : db2syscs.exe
    INSTANCE: DB2 NODE : 000 DB : LOC_DB
    APPHDL : 0-95 APPID: 10.11.201.60.50516.111122062509
    AUTHID : VACAVA
    EDUID : 636 EDUNAME: db2agent (LOC_DB)
    FUNCTION: DB2 UDB, oper system services, sqloisus3, probe:100
    MESSAGE : ZRC=0x83000005=-2097151995
    CALLED : OS, -, unspecified_system_function
    OSERR : 5 "Access is denied."

    So something else could be the cause for result set closed exception? or any changes required from java code side?

    Thanks in advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •