To capture the SQL, you will either need to have the DFT_MON_STMT parameter set to ON, or else have a session running with the statement monitor switch on (db2 update monitor switches using statement on).
You can then either use the snapshot output, or the db2pd command to determine the application ID holding the lock (e.g. db2 get snapshot for locks on $DBNAME).
Once you know the ID, you can run a:
db2 get snapshot for application agentid XXX
which should detail the SQL text.
You can also do this via the Control Centre GUI - right click database name -> Applications -> Show Lock Chains.
Graham Martin
http://www.ibm.com/software/data/db2/migration/