The recovery history file.
The recovery history file keeps track of many useful events. Use scripts or administrative views to export and format the data contained in this file for future use.
Command syntax
>>-LIST HISTORY--+-------------------+-------------------------->
+-BACKUP------------+
+-ROLLFORWARD-------+
+-DROPPED TABLE-----+
+-LOAD--------------+
+-CREATE TABLESPACE-+
+-ALTER TABLESPACE--+
+-RENAME TABLESPACE-+
+-REORG-------------+
'-ARCHIVE LOG-------'
>--+-ALL--------------------------------+----------------------->
+-SINCE--timestamp-------------------+
'-CONTAINING--+-schema.object_name-+-'
'-object_name--------'
>--FOR--+----------+--database-alias---------------------------><
+-DATABASE-+
'-DB-------'
OBS: Be sure to prune the history file from time to time!
Here is a quick way to know what DDL were executed on your production DB:
db2 list history all for db MYPRODDB | grep DDL:
If you redirect the output to a file and/or insert the file into some other DB, you can keep an history of all the events returned by the list history command.
Another way to get information from the recovery history file is to use the administrative view:
db2 -x "SELECT EID, START_TIME, CMD_TEXT FROM SYSIBMADM.DB_HISTORY
WHERE OPERATION IN ('A','N','O','T')" | tr -s " "