IBM Support

IC81304: DB2 MIGHT NOT CLOSE CLIENT SIDE CURSORS IF AN XA APPLICATION INVOKES XA_ROLLBACK.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • An XA application might not close client side cursors on XA
    rollback, and this behavior rises SQL0502N at second OPEN
    request.
    This problem is only applicable to withhold cursors, i.e.
    xa_open is set with HOLD_CURSOR=T.
    
    The following code illustrates one of the scenario to cause
    SQL0502N.
    
    1. Open a withhold cursor and make a XA transaction.
    EXEC SQL DECLARE CUR1 CURSOR WITH HOLD FOR <query string> FOR
    UPDATE;
    EXEC SQL OPEN CUR1;
    EXEC SQL FETCH CUR1 INTO :hv1;
    EXEC SQL UPDATE ORG SET <colname>=:hv1 WHERE CURRENT OF CUR1;
    
    2. Rollback the transaction.
    EXEC CICS SYNCPOINT ROLLBACLK;
    
    3. Open the cursor again.
    EXEC SQL OPEN CUR1;
    -> this request fails with SQL0502N.
    
    All cursors will be closed on rollback even if withhold cursors.
    However DB2 might not close client side cursors. This defect
    ensures to close client side cursors after xa_rollback.
    NOTE: Server side cursors are closed in this scenario.
    

Local fix

  • Close all cursors after rollback.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users who use XA application on DB2 client.                  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * An XA application might not close client side cursors on XA  *
    * rollback, and this behavior rises SQL0502N at second OPEN    *
    * request.                                                     *
    * This problem is only applicable to withhold cursors, i.e.    *
    * xa_open is set with HOLD_CURSOR=T.                           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please upgrade to V9.1 FixPack 12 or later.                  *
    ****************************************************************
    

Problem conclusion

  • This problem was first fixed in DB2 9.1 FixPack 12.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC81304

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-02-08

  • Closed date

    2012-08-02

  • Last modified date

    2012-08-02

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC81435 IC81436 IC84397

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R910 PSN

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1"}]

Document Information

Modified date:
19 September 2021