Error description
when there are applications in rollback or commit state, db2 get snapshot for locks on <db2_name> may receive sql1042c error. E.g. $ db2 get snapshot for locks on sample SQL1042C An unexpected system error occurred. SQLSTATE=58004 Some other utility which relies on the service of monitor component could also be affected, e.g db2top. In db2top, using 'U' option to collect lock information may also cause db2top exited with sql1042c error. The following records could be found in db2diag.log if turning on the database manager configuration parameter DIAGLEVEL to 4: 2013-03-12-03.43.12.074851-240 I243248E595 LEVEL: Info PID : 19365 TID : 46913030187328 KTID : xxxxxx PROC : db2sysc INSTANCE: db2inst1 NODE : 000 DB : SAMPLE APPHDL : 0-21 APPID: *LOCAL.db2inst1.130312073953 AUTHID : DB2INST1 HOSTNAME: host123 EDUID : 41 EDUNAME: db2agent (instance) FUNCTION: DB2 UDB, database monitor, sqm_snap_appl_locks, probe:10 DATA #1 : <preformatted> Snapshot cannot obtain lock information for application with app handle 13. Application in commit/rollback. The following records could be found in db2 trace: | | | | sqm___sqm_write_lock_waits entry [eduid 224497 eduname db2agent] | | | | sqm___sqm_write_lock_waits exit | | | sqm_snap_appl_locks data [probe 10] | | | sqm_snap_appl_locks exit [rc = 0x000004D2 = 1234] | | sqm___sqm_snap_db_locks exit [rc = 0x000004D2 = 1234] | | sqm___sqm_free_dbcb_list entry [eduid 224497 eduname db2agent] | | sqm___sqm_free_dbcb_list exit | sqm___sqlmonssagnt exit [rc = 0x000004D2 = 1234] | sqlm_buffer_postprocess entry [eduid 224497 eduname db2agent] | sqlm_buffer_postprocess data [probe 1] | sqlm_buffer_postprocess data [probe 2] | sqlm_buffer_postprocess exit | sqm___sqlmfree entry [eduid 224497 eduname db2agent] | sqm___sqlmfree exit [rc = 0xFFFFFFFF = -1] sqm___sqlmonssbackend exit [rc = 0xFFFFFFFF = -1]
Local fix
using db2pd -locks -db <db_name> to collect lock information
Problem summary
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * when there are applications in rollback or commit state, db2 * * get * * snapshot for locks on <db2_name> may receive sql1042c error. * * * * * * * * E.g. * * * * * * * * $ db2 get snapshot for locks on sample * * * * SQL1042C An unexpected system error occurred. * * SQLSTATE=58004 * * * * * * Some other utility which relies on the service of monitor * * * * component could also be affected, e.g db2top. In db2top, * * using * * 'U' option to collect lock information may also cause db2top * * * * exited with sql1042c error. * * * * * * * * The following records could be found in db2 trace: * * * * * * * * | | | | sqm___sqm_write_lock_waits entry [eduid 224497 * * eduname * * db2agent] * * * * | | | | sqm___sqm_write_lock_waits exit * * * * | | | sqm_snap_appl_locks data [probe 10] * * * * | | | sqm_snap_appl_locks exit [rc = 0x000004D2 = 1234] * * * * | | sqm___sqm_snap_db_locks exit [rc = 0x000004D2 = 1234] * * * * | | sqm___sqm_free_dbcb_list entry [eduid 224497 eduname * * * * db2agent] * * * * | | sqm___sqm_free_dbcb_list exit * * * * | sqm___sqlmonssagnt exit [rc = 0x000004D2 = 1234] * * * * | sqlm_buffer_postprocess entry [eduid 224497 eduname * * db2agent] * * | sqlm_buffer_postprocess data [probe 1] * * * * | sqlm_buffer_postprocess data [probe 2] * * * * | sqlm_buffer_postprocess exit * * * * | sqm___sqlmfree entry [eduid 224497 eduname db2agent] * * * * | sqm___sqlmfree exit [rc = 0xFFFFFFFF = -1] * * * * sqm___sqlmonssbackend exit [rc = 0xFFFFFFFF = -1] * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 db2_v97fp6 * ****************************************************************
Problem conclusion
The fix will be included in DB2 db2_v97fp6
Temporary fix
using db2pd -locks -db <db_name> to collect lock information
http://www-01.ibm.com/support/docview.wss?uid=swg1IC78490