IBM Support

IC77859: SQL0501N ENCOUNTERED WHEN EVMON_FORMAT_UE_TO_TABLES IS EXECUTED AGAINST A VERY LARGE UNFORMATTED EVENT TABLE.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • You may encounter SQL0501N when executing
    EVMON_FORMAT_UE_TO_TABLES in parallel through multiple sessions
    (each on a different data set) of a very large unformatted event
    table.
    
    $ db2 -stvf session1.sh
    call EVMON_FORMAT_UE_TO_TABLES ( 'UOW', NULL, NULL, NULL, NULL,
    NULL, NULL, 10000, 'SELECT * FROM EVMON.UOWEVENTS WHERE
    event_timestamp > ''2011-07-01-17.53.00.000000'' and
    event_timestamp <=''2011-07-01-17.53.05.000000''')
    
    $ db2 -stvf session2.sh
    call EVMON_FORMAT_UE_TO_TABLES ( 'UOW', NULL, NULL, NULL, NULL,
    NULL, NULL, 10000, 'SELECT * FROM EVMON.UOWEVENTS WHERE
    event_timestamp >''2011-07-01-17.53.05.000000'' and
    event_timestamp <=''2011-07-01-17.53.10.000000''')
    SQL0501N  The cursor specified in a FETCH statement or CLOSE
    statement is not
    open or a cursor variable in a cursor scalar function reference
    is not open.SQLSTATE=24501
    

Local fix

  • Set LOCKTIMEOUT to -1, but this will slow down the execution.
    

Problem summary

  • You may encounter SQL0501N when executing
    EVMON_FORMAT_UE_TO_TABLES in parallel through multiple sessions
    (each on a different data set) of a very large unformatted event
    table.
    
    $ db2 -stvf session1.sh
    call EVMON_FORMAT_UE_TO_TABLES ( 'UOW', NULL, NULL, NULL, NULL,
    NULL, NULL, 10000, 'SELECT * FROM EVMON.UOWEVENTS WHERE
    event_timestamp > ''2011-07-01-17.53.00.000000'' and
    event_timestamp <=''2011-07-01-17.53.05.000000''')
    
    $ db2 -stvf session2.sh
    call EVMON_FORMAT_UE_TO_TABLES ( 'UOW', NULL, NULL, NULL, NULL,
    NULL, NULL, 10000, 'SELECT * FROM EVMON.UOWEVENTS WHERE
    event_timestamp >''2011-07-01-17.53.05.000000'' and
    event_timestamp <=''2011-07-01-17.53.10.000000''')
    SQL0501N The cursor specified in a FETCH statement or CLOSE
    statement is not
    open or a cursor variable in a cursor scalar function reference
    is not open.SQLSTATE=24501
    

Problem conclusion

  • First fixed in DB2 Version 9.7 Fixpack 5.
    

Temporary fix

  • Set LOCKTIMEOUT to -1, but this will slow down the execution.
    

Comments

APAR Information

  • APAR number

    IC77859

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-01

  • Closed date

    2011-12-12

  • Last modified date

    2011-12-12

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

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC77859

Modified date: 12 December 2011