That's correct, I forgot to mention pureScale, but that too is not used where I'm running the monitoring, so don't need to worry about the member info!
I agree on the issue of online vs. PDF documentation, the former is my preference as well (even though, in this case we've found an inconsistency in the online version!).
Original Message:
Sent: Wed January 07, 2026 10:18 AM
From: Jan Nelken
Subject: How to audit the ALTER TABLE statements?
I am also assuming that you are not using PureScale - as in such case member-id may be needed...
As for docs - I am always using online documentation as this is updated "almost" on time as opposed to static links to PDF documents.
------------------------------
Jan Nelken
Db2 (LUW) DBA
Open for work
Katowice or Krakow
+48 783 109 863
------------------------------
Original Message:
Sent: Wed January 07, 2026 08:32 AM
From: Damir Wilder
Subject: How to audit the ALTER TABLE statements?
Hi Jan,
I was looking at the v11.5 docs, here's the link:
https://www.ibm.com/docs/en/db2/11.5.x?topic=reference-e#r0060168
However, I can see the same description in the v12.1 docs:
https://www.ibm.com/docs/en/db2/12.1.x?topic=reference-e#r0060168
But the page you sent indeed shows only three fields (omitting the EVENT_TYPE), so this is probably just a case of partially outdated documentation...
In any case, I am sure I will get uniqueness by only using the first two fields (as not using DPF anywhere): EVENT_TIMESTAMP and EVENT_ID.
Kind regards, Damir
------------------------------
Damir Wilder
Senior Consultant
Triton Consulting
London
Original Message:
Sent: Wed January 07, 2026 06:26 AM
From: Jan Nelken
Subject: How to audit the ALTER TABLE statements?
Hi Damir,
V12.1 documentation states only three fields:
https://www.ibm.com/docs/en/db2/12.1.x?topic=monitoring-data-generated-by-change-history-event-monitors
but if you found that four fields will give you "more unique" selection :-) than a/m three fields giving "only unique" :-)
- better for you. Where you found those 4 fields mentioned?
------------------------------
Jan Nelken
Db2 (LUW) DBA
Open for work
Katowice or Krakow
+48 783 109 863
Original Message:
Sent: Wed January 07, 2026 04:47 AM
From: Damir Wilder
Subject: How to audit the ALTER TABLE statements?
Hi Jan,
Just to confirm: after updating the Ev.Mon. for Change History (to include the event group CHANGESUMMARY), I can see the USERID and the remote client's IP address in the DDLSTMT_HISTORY_SUMMARY table!
Regarding the unique identification of monitoring events, the Db2 documentation goes even one step further, specifying four fields:
- Change history event monitor record
- The ID is recycled at database activation time. The uniqueness of events is guaranteed by the combination of event_timestamp, event_id, member, and event-type.
...and one would naively believe that using just the EVENT_ID would be sufficient for the purpose :-)
Kind regards, Damir
------------------------------
Damir Wilder
Senior Consultant
Triton Consulting
London
Original Message:
Sent: Tue January 06, 2026 03:28 PM
From: Jan Nelken
Subject: How to audit the ALTER TABLE statements?
Keep in mind that each change-related event is uniquely identified by the following three key fields:
- Event timestamp
- The time that the event occurred.
- Event ID
- A numeric token that ensures uniqueness in cases where the event timestamp is common.
- Member
- The database manager process where the event occurred.
------------------------------
Jan Nelken
Db2 (LUW) DBA
Open for work
Katowice or Krakow
+48 783 109 863
Original Message:
Sent: Tue January 06, 2026 09:42 AM
From: Damir Wilder
Subject: How to audit the ALTER TABLE statements?
Thanks for that Jan (and Madhusudan),
I will look into setting up this table and checking it out.
The reason I haven't already spotted it is because the Event Monitor was created just to collect the DDLSTMTEXEC data:
db2 "CREATE EVENT MONITOR EVMON_CHANGE_HISTORY FOR CHANGE HISTORY WHERE EVENT IN (DDLALL) WRITE TO TABLE DDLSTMTEXEC (TABLE DB2INST1.DDLSTMT_HISTORY IN USERSPACE1) AUTOSTART";
So, if I change the definition (and re-create the Ev.Mon.) as:
db2 "CREATE EVENT MONITOR EVMON_CHANGE_HISTORY FOR CHANGE HISTORY WHERE EVENT IN (DDLALL) WRITE TO TABLE DDLSTMTEXEC (TABLE DB2INST1.DDLSTMT_HISTORY IN USERSPACE1), CHANGESUMMARY (TABLE DB2INST1.DDLSTMT_HISTORY_SUMMARY) AUTOSTART";
That should give me the info that I need, right?
I will give it a go A.S.A.P. and report back the result!
Kind regards, Damir
------------------------------
Damir Wilder
Senior Consultant
Triton Consulting
London
Original Message:
Sent: Tue January 06, 2026 06:47 AM
From: Jan Nelken
Subject: How to audit the ALTER TABLE statements?
Perhaps the table CHANGESUMMARY_evmon-name has the info you are looking for?
When you created Change history event monitor - did you look which this event monitor related tables were modified when you issued for example ALTER TABLE ... ADD/DROP FOREIGN KEY?
------------------------------
Jan Nelken
Db2 (LUW) DBA
Open for work
Katowice or Krakow
+48 783 109 863