Exploring how to best populate a Db2 audit/history table to trace changes (before and after images) to a base table, as part of data governance.
The requirement is to run a daily batch job that extracts UNDO SQLs or before-image data (i.e., the state of rows before changes) from the Db2 log, capturing all relevant changes for a given period. The output should be in a format that can be loaded resumed directly into a Db2 table
Does Broadcom Log Analyzer for Db2 for z/OS support generating UNDO SQLs or before-images in a format specifically designed for direct loading into a Db2 table?
z/os DB2
Running UNDO SQL to get SQL statements is not a good solution as the data is not generated as load statements.
Use the Log Analyzer load file generation option with the UNDO option. Such a load file can be then used and loaded into tables (call them undo tables). The main issue is the need to have an undo table per every table in the Log Analyzer load file. If Log Analyzer generates a load file for 200 different tables there would need to be 200 undo tables.
see
creating load files