-- dba.v_deadlocks - deadlock count since last snapshot -- Downloaded from http://www.ebenner.com/db2luwdba-howto -- For use only with other components from article series: -- "Effective DB2 Monitoring with Snapshot Administrative Views" -- by Jeffrey Benner, in _DB2 LUW DBA HowTo_ -- Please direct any questions to consulting@ebenner.com -- This work is licensed under the Creative Commons Attribution 3.0 United State s License. To view a copy of this license, visit http://creativecommons.org/lice nses/by/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 3 00, San Francisco, California, 94105, USA. drop view dba.v_deadlocks; create view dba.v_deadlocks as select snap0.SNAPSHOT_TIMESTAMP, ( DEADLOCKS - ( select DEADLOCKS from dba.snapdb as SNAP1 where snap1.SNAPSHOT_TIMESTAMP = ( select max(snap2.SNAPSHOT_TIMESTAMP) from dba.snapdb as SNAP2 where snap2.SNAPSHOT_TIMESTAMP < snap0.SNAPSHOT_TIMESTAMP ) ) ) as DEADLOCKS from dba.snapdb as SNAP0 ;