5.13. Create and Activate a Db2 Change History Monitor for S4DBs

This guide describes the steps required to create and activate an event monitor on a monitored db2 database that is need for the db2 changehistory collector of Speedgain for Databases.

5.13.1. 1. Create and Activate the Event Monitor

Example Commands

Set the current schema to db2monitor:

db2 set current schema db2monitor

Create the change history event monitor and write the data to a table:

db2 "CREATE EVENT MONITOR s4dbs_history_monitor FOR CHANGE HISTORY WHERE EVENT IN (ALL) WRITE TO TABLE"

Activate the event monitor:

db2 "SET EVENT MONITOR s4dbs_history_monitor state 1"

5.13.2. 2. Activate the Collector in Speedgain

Navigate to the Speedgain for Databases Configuration Section and to the tab Policies to enable the Collector in your desired policy.

Important

The Collector selects and deletes the data directly at the monitored databases to maintain a low size in the monitored database.

5.13.3. Additional Information

More Info on HowTo create an event monitor can be found in the IBM Db2 documentation (for e.g. create the tables in a seperate tablespace with a quota) - https://www.ibm.com/docs/en/db2/11.5?topic=statements-create-event-monitor-change-history