I am in the process of setting up a central build server. The server is responsible to produce the official build artifacts that will be deployed to all environment. For one of the applications there is an build step that writes to a database. At deploy time we would need to run this build step to the appropriate environment. Since it is difficult/expensive to reliably reproduce this build step later the idea was born to capture the sql run just the sql script later at deployment time.
I have no control over the source code that generates the sql. It is an java program that uses hibernate. I haven't found out yet, where to put the log4j.properties/log4j.xml to use the hibernate trace functionality. And there might be a problem with prepared statements showing '?' instead of the actual value.
Does anyone have experience with Activity Monitor of DB2 and how to use it? Or is there other (easier) options like replacing the db2 driver in the hibernate configuration? I still want to use the DB2Dialect driver, though.
EDIT: I don't have control over the database structure. The database structure might be updated or the process might write to different tables in the future. This should not impact the solution I am setting up now.