Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

Chapter 5: Log analysis > Log analysis for auditing - Pg. 84

5.1 Log analysis for auditing Log analysis is useful when you need to see what type of transactional activity is taking place in your database. In native DB2, there is no functionality available to format the logs and to generate SQL from them. Here are two typical situations where log file auditing can be useful: You noticed that there was a spike in log space usage on a certain day and you need to determine what transactions are consuming the extra log space. You find some missing, extra, or modified rows in a table and you need to investigate when the changes were made and by which AUTHID. 5.1.1 Prerequisites for log analysis for auditing By default, the DB2 logger does not capture the AUTHID in transaction logs. There are two ways to enable capturing of AUTHID in log files: You can set the following registry variable: db2set DB2_LOGGING_DETAIL=AUTHID Then, you can recycle the DB2 instance (db2stop/db2start). Any transactions that follow this include AUTHID information as well. This method is the preferred method of capturing AUTHID because it covers all tables in