Hi,
in database snapshot check:
"First database connect timestamp" and "Last reset timestamp" , the higher value is starting timestamp.
Example:
First database connect timestamp = 05/14/2024 23:27:27.592933
Last reset timestamp =
After calling "db2 reset monitor all", now it is "Last reset timestamp":
First database connect timestamp = 05/14/2024 23:27:27.592933
Last reset timestamp = 05/14/2024 23:28:26.521517
This statement retrieves the duration in minutes considering LAST_RESET and DB_CONN_TIME:
SELECT timestampdiff(4, TIMESTAMP_FORMAT(a.SNAPSHOT_TIMESTAMP,'YYYY-MM-DD-HH24-MI.SS.NNNNNN') -
CASE WHEN a.LAST_RESET > a.DB_CONN_TIME THEN TIMESTAMP_FORMAT(a.LAST_RESET,'YYYY-MM-DD-HH24-MI.SS.NNNNNN') ELSE TIMESTAMP_FORMAT(a.DB_CONN_TIME,'YYYY-MM-DD-HH24-MI.SS.NNNNNN') end )
FROM TABLE(SNAP_GET_DB('', -2)) AS a;
------------------------------
Peter Schurr
------------------------------
Original Message:
Sent: Tue May 14, 2024 03:19 AM
From: Guy Przytula
Subject: snapshot timestamp
in db2 you can use the get snapshot command/view
is there a field that indicates since when these values are active
I presume since last activate timestamp
and is there a possibility to reset these counters without deactivate/db2stop ?
eg I want to know how many deadlocks we had ? but since when ? Deadlocks detected = xxx
------------------------------
Thanks for all answers
Best Regards,
Guy Przytula
------------------------------